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

Michael Niedermayer git at videolan.org
Thu Oct 25 21:29:17 CEST 2012


ffmpeg | branch: release/0.10 | Michael Niedermayer <michaelni at gmx.at> | Thu Oct 11 17:41:36 2012 +0200| [d12bf6fc9e7ea64f15e3b0a14e14ec49093ec81b] | committer: Michael Niedermayer

libvpxenc: fix memleak on error path

Fixes CID733795
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 104b1d9e103f90485e894b20dd5bb3f1964fe5f3)

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

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

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

diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index 621f818..1d33ce9 100644
--- a/libavcodec/libvpxenc.c
+++ b/libavcodec/libvpxenc.c
@@ -483,6 +483,7 @@ static int queue_frames(AVCodecContext *avctx, uint8_t *buf, int buf_size,
                     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