avcodec/libutvideoenc: Fix memleak

Fixes: CID1257657

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/116/merge
Michael Niedermayer 10 years ago
parent c5a07f1f84
commit 1cacecce79
  1. 4
      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);

Loading…
Cancel
Save