diff mbox series

[FFmpeg-devel,1/2] fftools/ffmpeg_opt: Fix leak of options when parsing options fails

Message ID 20200228210631.19477-1-andreas.rheinhardt@gmail.com
State Accepted
Headers show
Series [FFmpeg-devel,1/2] fftools/ffmpeg_opt: Fix leak of options when parsing options fails | expand

Checks

Context Check Description
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

Andreas Rheinhardt Feb. 28, 2020, 9:06 p.m. UTC
Fixes #8094.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 fftools/ffmpeg_opt.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Paul B Mahol Feb. 28, 2020, 10:30 p.m. UTC | #1
lgtm

On 2/28/20, Andreas Rheinhardt <andreas.rheinhardt@gmail.com> wrote:
> Fixes #8094.
>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
> ---
>  fftools/ffmpeg_opt.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
> index 12d44886ee..3bf90bd20c 100644
> --- a/fftools/ffmpeg_opt.c
> +++ b/fftools/ffmpeg_opt.c
> @@ -3278,6 +3278,7 @@ static int open_files(OptionGroupList *l, const char
> *inout,
>          if (ret < 0) {
>              av_log(NULL, AV_LOG_ERROR, "Error parsing options for %s file "
>                     "%s.\n", inout, g->arg);
> +            uninit_options(&o);
>              return ret;
>          }
>
> --
> 2.20.1
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
Michael Niedermayer Feb. 29, 2020, 9:29 p.m. UTC | #2
On Fri, Feb 28, 2020 at 11:30:28PM +0100, Paul B Mahol wrote:
> lgtm

will apply

thx

[...]
diff mbox series

Patch

diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index 12d44886ee..3bf90bd20c 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -3278,6 +3278,7 @@  static int open_files(OptionGroupList *l, const char *inout,
         if (ret < 0) {
             av_log(NULL, AV_LOG_ERROR, "Error parsing options for %s file "
                    "%s.\n", inout, g->arg);
+            uninit_options(&o);
             return ret;
         }