libavutil/opt: fix memory leak after av_dict_parse_string fail
authorJun Zhao <barryjzhao@tencent.com>
Wed, 1 Jan 2020 04:35:31 +0000 (12:35 +0800)
committerJun Zhao <barryjzhao@tencent.com>
Sat, 4 Jan 2020 01:05:23 +0000 (09:05 +0800)
commit3c8da7b9826d03e370cab550a403ed0e14da24ef
tree2708e7217d2042ef12d2bbb96ed1b7a0d6a05dbd
parentc8e72a6494ebffbe930a30823cb70a0671e6bfe0
libavutil/opt: 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.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
libavutil/opt.c