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

Andreas Rheinhardt andreas.rheinhardt at gmail.com
Thu Mar 25 01:33:33 EET 2021


Andreas Rheinhardt:
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at 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


More information about the ffmpeg-devel mailing list