mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-25 12:40:01 +00:00
lavc/bsf: 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>
This commit is contained in:
parent
944203270d
commit
0099f71502
@ -517,8 +517,8 @@ static int bsf_parse_single(const char *str, AVBSFList *bsf_lst)
|
||||
|
||||
ret = av_bsf_list_append2(bsf_lst, bsf_name, &bsf_options);
|
||||
|
||||
av_dict_free(&bsf_options);
|
||||
end:
|
||||
av_dict_free(&bsf_options);
|
||||
av_free(buf);
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user