Commit 1cacecce authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/libutvideoenc: Fix memleak

Fixes: CID1257657
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent c5a07f1f
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment