[FFmpeg-cvslog] libvpxenc: fix memleak on error path

Michael Niedermayer git at videolan.org
Thu Oct 11 18:07:45 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Oct 11 17:41:36 2012 +0200| [104b1d9e103f90485e894b20dd5bb3f1964fe5f3] | committer: Michael Niedermayer

libvpxenc: fix memleak on error path

Fixes CID733795
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/libvpxenc.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index 2c9ae9e..aecff79 100644
--- a/libavcodec/libvpxenc.c
+++ b/libavcodec/libvpxenc.c
@@ -491,6 +491,7 @@ static int queue_frames(AVCodecContext *avctx, AVPacket *pkt_out,
                     av_log(avctx, AV_LOG_ERROR,
                            "Data buffer alloc (%zu bytes) failed\n",
                            cx_frame->sz);
+                    av_free(cx_frame);
                     return AVERROR(ENOMEM);
                 }
                 memcpy(cx_frame->buf, pkt->data.frame.buf, pkt->data.frame.sz);



More information about the ffmpeg-cvslog mailing list