Commit cf9c9a9d authored by Jun Zhao's avatar Jun Zhao

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: 's avatarJun Zhao <barryjzhao@tencent.com>
parent 0099f715
...@@ -110,8 +110,8 @@ static av_cold int libkvazaar_init(AVCodecContext *avctx) ...@@ -110,8 +110,8 @@ static av_cold int libkvazaar_init(AVCodecContext *avctx)
entry->key, entry->value); entry->key, entry->value);
} }
} }
av_dict_free(&dict);
} }
av_dict_free(&dict);
} }
ctx->encoder = enc = api->encoder_open(cfg); ctx->encoder = enc = api->encoder_open(cfg);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment