Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-12-17 01:54:43 +0400
committerAnton Khirnov <anton@khirnov.net>2014-01-06 11:21:58 +0400
commit50079a6aa93291e6dc9d9fb8d33da83f79e9311d (patch)
tree5570210e19a15fecfbdb996ba91c9b80d7421909 /libavcodec/utils.c
parent3867f3718ba82ff11d3e24c6d84beb520d0b174f (diff)
lavc: do not leak the internal frame if opening the codec fails
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 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;