mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-11 19:51:25 +08:00
avcodec/utils: fix memleak on avcodec_open2() failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -1477,8 +1477,10 @@ end:
|
|||||||
free_and_end:
|
free_and_end:
|
||||||
av_dict_free(&tmp);
|
av_dict_free(&tmp);
|
||||||
av_freep(&avctx->priv_data);
|
av_freep(&avctx->priv_data);
|
||||||
if (avctx->internal)
|
if (avctx->internal) {
|
||||||
av_freep(&avctx->internal->pool);
|
av_freep(&avctx->internal->pool);
|
||||||
|
av_frame_free(&avctx->internal->to_free);
|
||||||
|
}
|
||||||
av_freep(&avctx->internal);
|
av_freep(&avctx->internal);
|
||||||
avctx->codec = NULL;
|
avctx->codec = NULL;
|
||||||
goto end;
|
goto end;
|
||||||
|
Reference in New Issue
Block a user