[FFmpeg-cvslog] libopencore-amr: fix memleak

Paul B Mahol git at videolan.org
Sat Jan 28 22:24:30 CET 2012


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat Jan 28 20:01:09 2012 +0000| [f913f3788a369ab6f26d46367e872e6bf0a02685] | committer: Michael Niedermayer

libopencore-amr: fix memleak

Signed-off-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/libopencore-amr.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/libavcodec/libopencore-amr.c b/libavcodec/libopencore-amr.c
index d4853ca..7a0555e 100644
--- a/libavcodec/libopencore-amr.c
+++ b/libavcodec/libopencore-amr.c
@@ -202,6 +202,7 @@ static av_cold int amr_nb_encode_init(AVCodecContext *avctx)
     s->enc_state = Encoder_Interface_init(s->enc_dtx);
     if (!s->enc_state) {
         av_log(avctx, AV_LOG_ERROR, "Encoder_Interface_init error\n");
+        av_freep(&avctx->coded_frame);
         return -1;
     }
 



More information about the ffmpeg-cvslog mailing list