Commit 8b285f03 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/utils: fix memleak on avcodec_open2() failure

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 866c44d4
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment