summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-11 17:41:36 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-11 17:41:36 +0200
commit104b1d9e103f90485e894b20dd5bb3f1964fe5f3 (patch)
treef389ffee05e2d4557e4677486f754b69dab8d7c8 /libavcodec
parentc9454cb643f5404ca8f4f02e1384c863136f7a9e (diff)
libvpxenc: fix memleak on error path
Fixes CID733795 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/libvpxenc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index 2c9ae9ec9b..aecff79b87 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);