[FFmpeg-cvslog] avcodec/utils: fix memleak on avcodec_open2() failure
Michael Niedermayer
git at videolan.org
Mon Dec 23 02:00:38 CET 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Dec 23 01:53:05 2013 +0100| [8b285f03f70e884312c6c4e00a1377cfd85a3a7a] | committer: Michael Niedermayer
avcodec/utils: fix memleak on avcodec_open2() failure
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8b285f03f70e884312c6c4e00a1377cfd85a3a7a
---
libavcodec/utils.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index b8a8d47..c000d27 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;
More information about the ffmpeg-cvslog
mailing list