[FFmpeg-cvslog] avformat/aqtitledec: Fix memleak upon read header failure
ffmpeg | branch: release/3.2 | Andreas Rheinhardt | Sun Jun 14 03:04:29 2020 +0200| [91e430ab585689331a6071e0500f03d5b59adf46] | committer: Andreas Rheinhardt avformat/aqtitledec: Fix memleak upon read header failure The already parsed subtitles (contained in an FFDemuxSubtitlesQueue) would leak if an error happened upon reading a subsequent subtitle. Signed-off-by: Andreas Rheinhardt (cherry picked from commit a86a5d06d8967d01964833456df1df9fc186f125) Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=91e430ab585689331a6071e0500f03d5b59adf46 --- libavformat/aqtitledec.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavformat/aqtitledec.c b/libavformat/aqtitledec.c index f0e840b0f7..317547c4f4 100644 --- a/libavformat/aqtitledec.c +++ b/libavformat/aqtitledec.c @@ -81,11 +81,11 @@ static int aqt_read_header(AVFormatContext *s) if (!new_event) { sub = ff_subtitles_queue_insert(>q, "\n", 1, 1); if (!sub) -return AVERROR(ENOMEM); +goto fail; } sub = ff_subtitles_queue_insert(>q, line, strlen(line), !new_event); if (!sub) -return AVERROR(ENOMEM); +goto fail; if (new_event) { sub->pts = frame; sub->duration = -1; @@ -97,6 +97,9 @@ static int aqt_read_header(AVFormatContext *s) ff_subtitles_queue_finalize(s, >q); return 0; +fail: +ff_subtitles_queue_clean(>q); +return AVERROR(ENOMEM); } static int aqt_read_packet(AVFormatContext *s, AVPacket *pkt) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/aqtitledec: Fix memleak upon read header failure
ffmpeg | branch: release/3.3 | Andreas Rheinhardt | Sun Jun 14 03:04:29 2020 +0200| [950b32a2e86bdbbee2235bf707d5fb8ac6e90d32] | committer: Andreas Rheinhardt avformat/aqtitledec: Fix memleak upon read header failure The already parsed subtitles (contained in an FFDemuxSubtitlesQueue) would leak if an error happened upon reading a subsequent subtitle. Signed-off-by: Andreas Rheinhardt (cherry picked from commit a86a5d06d8967d01964833456df1df9fc186f125) Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=950b32a2e86bdbbee2235bf707d5fb8ac6e90d32 --- libavformat/aqtitledec.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavformat/aqtitledec.c b/libavformat/aqtitledec.c index f0e840b0f7..317547c4f4 100644 --- a/libavformat/aqtitledec.c +++ b/libavformat/aqtitledec.c @@ -81,11 +81,11 @@ static int aqt_read_header(AVFormatContext *s) if (!new_event) { sub = ff_subtitles_queue_insert(>q, "\n", 1, 1); if (!sub) -return AVERROR(ENOMEM); +goto fail; } sub = ff_subtitles_queue_insert(>q, line, strlen(line), !new_event); if (!sub) -return AVERROR(ENOMEM); +goto fail; if (new_event) { sub->pts = frame; sub->duration = -1; @@ -97,6 +97,9 @@ static int aqt_read_header(AVFormatContext *s) ff_subtitles_queue_finalize(s, >q); return 0; +fail: +ff_subtitles_queue_clean(>q); +return AVERROR(ENOMEM); } static int aqt_read_packet(AVFormatContext *s, AVPacket *pkt) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/aqtitledec: Fix memleak upon read header failure
ffmpeg | branch: release/3.4 | Andreas Rheinhardt | Sun Jun 14 03:04:29 2020 +0200| [58fd406e27fb8c6386830a9d6b4816b5019ac015] | committer: Andreas Rheinhardt avformat/aqtitledec: Fix memleak upon read header failure The already parsed subtitles (contained in an FFDemuxSubtitlesQueue) would leak if an error happened upon reading a subsequent subtitle. Signed-off-by: Andreas Rheinhardt (cherry picked from commit a86a5d06d8967d01964833456df1df9fc186f125) Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=58fd406e27fb8c6386830a9d6b4816b5019ac015 --- libavformat/aqtitledec.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavformat/aqtitledec.c b/libavformat/aqtitledec.c index f0e840b0f7..317547c4f4 100644 --- a/libavformat/aqtitledec.c +++ b/libavformat/aqtitledec.c @@ -81,11 +81,11 @@ static int aqt_read_header(AVFormatContext *s) if (!new_event) { sub = ff_subtitles_queue_insert(>q, "\n", 1, 1); if (!sub) -return AVERROR(ENOMEM); +goto fail; } sub = ff_subtitles_queue_insert(>q, line, strlen(line), !new_event); if (!sub) -return AVERROR(ENOMEM); +goto fail; if (new_event) { sub->pts = frame; sub->duration = -1; @@ -97,6 +97,9 @@ static int aqt_read_header(AVFormatContext *s) ff_subtitles_queue_finalize(s, >q); return 0; +fail: +ff_subtitles_queue_clean(>q); +return AVERROR(ENOMEM); } static int aqt_read_packet(AVFormatContext *s, AVPacket *pkt) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/aqtitledec: Fix memleak upon read header failure
ffmpeg | branch: release/4.0 | Andreas Rheinhardt | Sun Jun 14 03:04:29 2020 +0200| [7a1a1542a0ab079f08dc5b38dba1641ffe4e7691] | committer: Andreas Rheinhardt avformat/aqtitledec: Fix memleak upon read header failure The already parsed subtitles (contained in an FFDemuxSubtitlesQueue) would leak if an error happened upon reading a subsequent subtitle. Signed-off-by: Andreas Rheinhardt (cherry picked from commit a86a5d06d8967d01964833456df1df9fc186f125) Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7a1a1542a0ab079f08dc5b38dba1641ffe4e7691 --- libavformat/aqtitledec.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavformat/aqtitledec.c b/libavformat/aqtitledec.c index f0e840b0f7..317547c4f4 100644 --- a/libavformat/aqtitledec.c +++ b/libavformat/aqtitledec.c @@ -81,11 +81,11 @@ static int aqt_read_header(AVFormatContext *s) if (!new_event) { sub = ff_subtitles_queue_insert(>q, "\n", 1, 1); if (!sub) -return AVERROR(ENOMEM); +goto fail; } sub = ff_subtitles_queue_insert(>q, line, strlen(line), !new_event); if (!sub) -return AVERROR(ENOMEM); +goto fail; if (new_event) { sub->pts = frame; sub->duration = -1; @@ -97,6 +97,9 @@ static int aqt_read_header(AVFormatContext *s) ff_subtitles_queue_finalize(s, >q); return 0; +fail: +ff_subtitles_queue_clean(>q); +return AVERROR(ENOMEM); } static int aqt_read_packet(AVFormatContext *s, AVPacket *pkt) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/aqtitledec: Fix memleak upon read header failure
ffmpeg | branch: release/4.1 | Andreas Rheinhardt | Sun Jun 14 03:04:29 2020 +0200| [b9be0b6fe869d4045da0e78a7d3f92255f8eb680] | committer: Andreas Rheinhardt avformat/aqtitledec: Fix memleak upon read header failure The already parsed subtitles (contained in an FFDemuxSubtitlesQueue) would leak if an error happened upon reading a subsequent subtitle. Signed-off-by: Andreas Rheinhardt (cherry picked from commit a86a5d06d8967d01964833456df1df9fc186f125) Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b9be0b6fe869d4045da0e78a7d3f92255f8eb680 --- libavformat/aqtitledec.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavformat/aqtitledec.c b/libavformat/aqtitledec.c index f0e840b0f7..317547c4f4 100644 --- a/libavformat/aqtitledec.c +++ b/libavformat/aqtitledec.c @@ -81,11 +81,11 @@ static int aqt_read_header(AVFormatContext *s) if (!new_event) { sub = ff_subtitles_queue_insert(>q, "\n", 1, 1); if (!sub) -return AVERROR(ENOMEM); +goto fail; } sub = ff_subtitles_queue_insert(>q, line, strlen(line), !new_event); if (!sub) -return AVERROR(ENOMEM); +goto fail; if (new_event) { sub->pts = frame; sub->duration = -1; @@ -97,6 +97,9 @@ static int aqt_read_header(AVFormatContext *s) ff_subtitles_queue_finalize(s, >q); return 0; +fail: +ff_subtitles_queue_clean(>q); +return AVERROR(ENOMEM); } static int aqt_read_packet(AVFormatContext *s, AVPacket *pkt) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/aqtitledec: Fix memleak upon read header failure
ffmpeg | branch: release/4.2 | Andreas Rheinhardt | Sun Jun 14 03:04:29 2020 +0200| [24ef2a85a335d02cd57186e21098ea57218ca014] | committer: Andreas Rheinhardt avformat/aqtitledec: Fix memleak upon read header failure The already parsed subtitles (contained in an FFDemuxSubtitlesQueue) would leak if an error happened upon reading a subsequent subtitle. Signed-off-by: Andreas Rheinhardt (cherry picked from commit a86a5d06d8967d01964833456df1df9fc186f125) Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=24ef2a85a335d02cd57186e21098ea57218ca014 --- libavformat/aqtitledec.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavformat/aqtitledec.c b/libavformat/aqtitledec.c index 8cc82a8f39..81630d73b0 100644 --- a/libavformat/aqtitledec.c +++ b/libavformat/aqtitledec.c @@ -81,11 +81,11 @@ static int aqt_read_header(AVFormatContext *s) if (!new_event) { sub = ff_subtitles_queue_insert(>q, "\n", 1, 1); if (!sub) -return AVERROR(ENOMEM); +goto fail; } sub = ff_subtitles_queue_insert(>q, line, strlen(line), !new_event); if (!sub) -return AVERROR(ENOMEM); +goto fail; if (new_event) { sub->pts = frame; sub->duration = -1; @@ -97,6 +97,9 @@ static int aqt_read_header(AVFormatContext *s) ff_subtitles_queue_finalize(s, >q); return 0; +fail: +ff_subtitles_queue_clean(>q); +return AVERROR(ENOMEM); } static int aqt_read_packet(AVFormatContext *s, AVPacket *pkt) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/aqtitledec: Fix memleak upon read header failure
ffmpeg | branch: release/4.3 | Andreas Rheinhardt | Sun Jun 14 03:04:29 2020 +0200| [7c0a9ff9c01112be075156c88e565f2ec28c9e2d] | committer: Andreas Rheinhardt avformat/aqtitledec: Fix memleak upon read header failure The already parsed subtitles (contained in an FFDemuxSubtitlesQueue) would leak if an error happened upon reading a subsequent subtitle. Signed-off-by: Andreas Rheinhardt (cherry picked from commit a86a5d06d8967d01964833456df1df9fc186f125) > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7c0a9ff9c01112be075156c88e565f2ec28c9e2d --- libavformat/aqtitledec.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavformat/aqtitledec.c b/libavformat/aqtitledec.c index 8cc82a8f39..81630d73b0 100644 --- a/libavformat/aqtitledec.c +++ b/libavformat/aqtitledec.c @@ -81,11 +81,11 @@ static int aqt_read_header(AVFormatContext *s) if (!new_event) { sub = ff_subtitles_queue_insert(>q, "\n", 1, 1); if (!sub) -return AVERROR(ENOMEM); +goto fail; } sub = ff_subtitles_queue_insert(>q, line, strlen(line), !new_event); if (!sub) -return AVERROR(ENOMEM); +goto fail; if (new_event) { sub->pts = frame; sub->duration = -1; @@ -97,6 +97,9 @@ static int aqt_read_header(AVFormatContext *s) ff_subtitles_queue_finalize(s, >q); return 0; +fail: +ff_subtitles_queue_clean(>q); +return AVERROR(ENOMEM); } static int aqt_read_packet(AVFormatContext *s, AVPacket *pkt) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/aqtitledec: Fix memleak upon read header failure
ffmpeg | branch: master | Andreas Rheinhardt | Sun Jun 14 03:04:29 2020 +0200| [a86a5d06d8967d01964833456df1df9fc186f125] | committer: Andreas Rheinhardt avformat/aqtitledec: Fix memleak upon read header failure The already parsed subtitles (contained in an FFDemuxSubtitlesQueue) would leak if an error happened upon reading a subsequent subtitle. Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a86a5d06d8967d01964833456df1df9fc186f125 --- libavformat/aqtitledec.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavformat/aqtitledec.c b/libavformat/aqtitledec.c index 8cc82a8f39..81630d73b0 100644 --- a/libavformat/aqtitledec.c +++ b/libavformat/aqtitledec.c @@ -81,11 +81,11 @@ static int aqt_read_header(AVFormatContext *s) if (!new_event) { sub = ff_subtitles_queue_insert(>q, "\n", 1, 1); if (!sub) -return AVERROR(ENOMEM); +goto fail; } sub = ff_subtitles_queue_insert(>q, line, strlen(line), !new_event); if (!sub) -return AVERROR(ENOMEM); +goto fail; if (new_event) { sub->pts = frame; sub->duration = -1; @@ -97,6 +97,9 @@ static int aqt_read_header(AVFormatContext *s) ff_subtitles_queue_finalize(s, >q); return 0; +fail: +ff_subtitles_queue_clean(>q); +return AVERROR(ENOMEM); } static int aqt_read_packet(AVFormatContext *s, AVPacket *pkt) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".