aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2014-11-17 00:22:28 +0100
committerVittorio Giovara <vittorio.giovara@gmail.com>2014-11-18 00:38:56 +0100
commit771656bd85416cd6308b11aed6f2c69a8db9c21b (patch)
tree50b6d1c5fa6e7840c3dae000e5b659809132c208
parenta28468d0daf4be14761c16a3ddd33266b2380123 (diff)
downloadffmpeg-771656bd85416cd6308b11aed6f2c69a8db9c21b.tar.gz
libvpxenc: clean memory on error
CC: libav-stable@libav.org Bug-Id: CID 733795
-rw-r--r--libavcodec/libvpxenc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index 86e4be9242..8ff7b28435 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);