diff options
author | Jun Zhao <barryjzhao@tencent.com> | 2020-01-01 12:09:52 +0800 |
---|---|---|
committer | Jun Zhao <barryjzhao@tencent.com> | 2020-01-04 09:04:58 +0800 |
commit | cf9c9a9db93ac5158ad77ba7f6d23493d7e8e222 (patch) | |
tree | bbab7c9d1c8238f1de4081192264b6138b66d3d3 | |
parent | 0099f71502b7b88ae11ea7360d0f751be8d5878e (diff) | |
download | ffmpeg-cf9c9a9db93ac5158ad77ba7f6d23493d7e8e222.tar.gz |
lavc/libkvazaar: fix memory leak after av_dict_parse_string fail
In case of failure, all the successfully set entries are stored in
*pm. We need to manually free the created dictionary to avoid
memory leak.
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
-rw-r--r-- | libavcodec/libkvazaar.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/libkvazaar.c b/libavcodec/libkvazaar.c index a89ca7f749..02bcae3d5c 100644 --- a/libavcodec/libkvazaar.c +++ b/libavcodec/libkvazaar.c @@ -110,8 +110,8 @@ static av_cold int libkvazaar_init(AVCodecContext *avctx) entry->key, entry->value); } } - av_dict_free(&dict); } + av_dict_free(&dict); } ctx->encoder = enc = api->encoder_open(cfg); |