diff mbox series

[FFmpeg-devel,1/6] avformat/jacosubdec: Fix leak on error

Message ID 20210324054043.1729328-1-andreas.rheinhardt@gmail.com
State Accepted
Commit 4f11685e4c882c0dad3c946c6314def140de3205
Headers show
Series [FFmpeg-devel,1/6] avformat/jacosubdec: Fix leak on error
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Andreas Rheinhardt March 24, 2021, 5:40 a.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavformat/jacosubdec.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Andreas Rheinhardt March 24, 2021, 11:33 p.m. UTC | #1
Andreas Rheinhardt:
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
> ---
>  libavformat/jacosubdec.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/libavformat/jacosubdec.c b/libavformat/jacosubdec.c
> index b44e3b7783..828c33057f 100644
> --- a/libavformat/jacosubdec.c
> +++ b/libavformat/jacosubdec.c
> @@ -199,6 +199,7 @@ static int jacosub_read_header(AVFormatContext *s)
>  
>              sub = ff_subtitles_queue_insert(&jacosub->q, line, len, merge_line);
>              if (!sub) {
> +                av_bprint_finalize(&header, NULL);
>                  ret = AVERROR(ENOMEM);
>                  goto fail;
>              }
> 
Will apply this patchset later tonight unless there are objections.

- Andreas
diff mbox series

Patch

diff --git a/libavformat/jacosubdec.c b/libavformat/jacosubdec.c
index b44e3b7783..828c33057f 100644
--- a/libavformat/jacosubdec.c
+++ b/libavformat/jacosubdec.c
@@ -199,6 +199,7 @@  static int jacosub_read_header(AVFormatContext *s)
 
             sub = ff_subtitles_queue_insert(&jacosub->q, line, len, merge_line);
             if (!sub) {
+                av_bprint_finalize(&header, NULL);
                 ret = AVERROR(ENOMEM);
                 goto fail;
             }