mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
lavc/utils: free private options on avcodec_open2 fail
It protects leaking string/binary/dict options from priv context. Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
This commit is contained in:
parent
ea0d893817
commit
1907ff0a67
1 changed files with 2 additions and 0 deletions
|
|
@ -1690,6 +1690,8 @@ end:
|
|||
return ret;
|
||||
free_and_end:
|
||||
av_dict_free(&tmp);
|
||||
if (codec->priv_class && codec->priv_data_size)
|
||||
av_opt_free(avctx->priv_data);
|
||||
av_freep(&avctx->priv_data);
|
||||
if (avctx->internal) {
|
||||
av_frame_free(&avctx->internal->to_free);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue