summaryrefslogtreecommitdiff
path: root/libavcodec/libopencore-amr.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2012-01-28 20:01:09 +0000
committerMichael Niedermayer <michaelni@gmx.at>2012-01-28 22:08:20 +0100
commitf913f3788a369ab6f26d46367e872e6bf0a02685 (patch)
tree5be2b17200f0f4cca9ee914ff96ccc2823bce7af /libavcodec/libopencore-amr.c
parent766e160e87c3c1997559b8225a635b68a06167fc (diff)
libopencore-amr: fix memleak
Signed-off-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/libopencore-amr.c')
-rw-r--r--libavcodec/libopencore-amr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/libopencore-amr.c b/libavcodec/libopencore-amr.c
index d4853ca200..7a0555e6c5 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;
}