1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-13 21:28:01 +02:00

avcodec/utils: fix memleak on avcodec_open2() failure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-12-23 01:53:05 +01:00
parent 866c44d4b0
commit 8b285f03f7

View File

@ -1477,8 +1477,10 @@ end:
free_and_end:
av_dict_free(&tmp);
av_freep(&avctx->priv_data);
if (avctx->internal)
if (avctx->internal) {
av_freep(&avctx->internal->pool);
av_frame_free(&avctx->internal->to_free);
}
av_freep(&avctx->internal);
avctx->codec = NULL;
goto end;