avcodec/libutvideoenc: fix leak of info array on error
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 11 Dec 2014 14:44:05 +0000 (15:44 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 11 Dec 2014 16:13:49 +0000 (17:13 +0100)
Fixes CID1257657

Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/libutvideoenc.cpp

index 3298e64..3deb1c7 100644 (file)
@@ -100,6 +100,7 @@ static av_cold int utvideo_encode_init(AVCodecContext *avctx)
 
     if (utv->buffer == NULL) {
         av_log(avctx, AV_LOG_ERROR, "Could not allocate output buffer.\n");
+        av_free(info);
         return AVERROR(ENOMEM);
     }