summaryrefslogtreecommitdiff
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-12-23 01:53:05 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-12-23 01:54:13 +0100
commit8b285f03f70e884312c6c4e00a1377cfd85a3a7a (patch)
tree172aa2f49879226b1ce5a5b027672bacfc6ab30e /libavcodec/utils.c
parent866c44d4b0f90d448cffbe9d4422a2dec7df698b (diff)
avcodec/utils: fix memleak on avcodec_open2() failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index b8a8d471f6..c000d27155 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -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;