aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-11 17:41:36 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-25 21:09:22 +0200
commitd12bf6fc9e7ea64f15e3b0a14e14ec49093ec81b (patch)
tree6705b18416d39c3b9ede534f63992dc74e3ace6a
parent8a525e4d18c503e79df3f526006ffbfda7955b39 (diff)
downloadffmpeg-d12bf6fc9e7ea64f15e3b0a14e14ec49093ec81b.tar.gz
libvpxenc: fix memleak on error path
Fixes CID733795 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 104b1d9e103f90485e894b20dd5bb3f1964fe5f3) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/libvpxenc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index 621f818c9f..1d33ce9aec 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);