diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-06-03 15:26:50 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-06-03 15:26:50 +0200 |
commit | 3ed56b3b3992c85685aed405003caa5a8433eb53 (patch) | |
tree | 54c5f2dd4da87d671120cb0d598cc4677207ca0b /libavfilter/avfilter.c | |
parent | 7e7d090907310babeecd3d288ccb5d17d2a85ede (diff) | |
download | ffmpeg-3ed56b3b3992c85685aed405003caa5a8433eb53.tar.gz |
avfilter/process_options: fix memleak
Fixes CID1026765
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/avfilter.c')
-rw-r--r-- | libavfilter/avfilter.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index c10a81bfb7..9e3977cca0 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -755,8 +755,11 @@ static int process_options(AVFilterContext *ctx, AVDictionary **options, if (av_opt_find(ctx, key, NULL, 0, 0)) { ret = av_opt_set(ctx, key, value, 0); - if (ret < 0) + if (ret < 0) { + av_free(value); + av_free(parsed_key); return ret; + } } else { av_dict_set(options, key, value, 0); if ((ret = av_opt_set(ctx->priv, key, value, 0)) < 0) { |