aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-12-16 22:54:43 +0100
committerAnton Khirnov <anton@khirnov.net>2014-01-06 08:21:58 +0100
commit50079a6aa93291e6dc9d9fb8d33da83f79e9311d (patch)
tree5570210e19a15fecfbdb996ba91c9b80d7421909
parent3867f3718ba82ff11d3e24c6d84beb520d0b174f (diff)
downloadffmpeg-50079a6aa93291e6dc9d9fb8d33da83f79e9311d.tar.gz
lavc: do not leak the internal frame if opening the codec fails
-rw-r--r--libavcodec/utils.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 1c56d79772..1b29b1b884 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1102,8 +1102,10 @@ end:
free_and_end:
av_dict_free(&tmp);
av_freep(&avctx->priv_data);
- if (avctx->internal)
+ if (avctx->internal) {
+ av_frame_free(&avctx->internal->to_free);
av_freep(&avctx->internal->pool);
+ }
av_freep(&avctx->internal);
avctx->codec = NULL;
goto end;