[FFmpeg-cvslog] avcodec/utils: fix minor memory leaks on avcodec_open2() failure

wm4 git at videolan.org
Fri Apr 22 19:30:54 CEST 2016


ffmpeg | branch: master | wm4 <nfxjfg at googlemail.com> | Fri Apr 22 19:29:48 2016 +0200| [27adf9f9cdbc6f1dc0a1292dc97490eec6f2f068] | committer: wm4

avcodec/utils: fix minor memory leaks on avcodec_open2() failure

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=27adf9f9cdbc6f1dc0a1292dc97490eec6f2f068
---

 libavcodec/utils.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 52e0d92..946ecb9 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1670,6 +1670,8 @@ FF_ENABLE_DEPRECATION_WARNINGS
     av_dict_free(&tmp);
     av_freep(&avctx->priv_data);
     if (avctx->internal) {
+        av_packet_free(&avctx->internal->buffer_pkt);
+        av_frame_free(&avctx->internal->buffer_frame);
         av_frame_free(&avctx->internal->to_free);
         av_freep(&avctx->internal->pool);
     }



More information about the ffmpeg-cvslog mailing list