diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-05-16 00:53:24 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-05-25 01:32:46 +0300 |
commit | 1cacecce79537a2c114c70c325b719774a8387eb (patch) | |
tree | 7545171831c2e443dcfe4c024d3173a04bd6976b /libavcodec | |
parent | c5a07f1f8404d61a344662d1cc430b1a708a9dae (diff) |
avcodec/libutvideoenc: Fix memleak
Fixes: CID1257657
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/libutvideoenc.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/libutvideoenc.cpp b/libavcodec/libutvideoenc.cpp index 3b88ffffe7..cf669d28a0 100644 --- a/libavcodec/libutvideoenc.cpp +++ b/libavcodec/libutvideoenc.cpp @@ -96,8 +96,10 @@ static av_cold int utvideo_encode_init(AVCodecContext *avctx) * since we cannot decode planes separately with it. */ ret = avpicture_get_size(avctx->pix_fmt, avctx->width, avctx->height); - if (ret < 0) + if (ret < 0) { + av_free(info); return ret; + } utv->buf_size = ret; utv->buffer = (uint8_t *)av_malloc(utv->buf_size); |