ffmpeg | branch: master | Vittorio Giovara <vittorio.giov...@gmail.com> | Mon 
Nov 17 00:22:28 2014 +0100| [771656bd85416cd6308b11aed6f2c69a8db9c21b] | 
committer: Vittorio Giovara

libvpxenc: clean memory on error

CC: libav-sta...@libav.org
Bug-Id: CID 733795

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

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

diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index 86e4be9..8ff7b28 100644
--- a/libavcodec/libvpxenc.c
+++ b/libavcodec/libvpxenc.c
@@ -470,6 +470,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_freep(&cx_frame);
                     return AVERROR(ENOMEM);
                 }
                 memcpy(cx_frame->buf, pkt->data.frame.buf, pkt->data.frame.sz);

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to