[FFmpeg-devel] [PATCH] avcodec/libutvideoenc: fix leak of info array on error

Michael Niedermayer michaelni at gmx.at
Thu Dec 11 15:52:33 CET 2014


Fixes CID1257657

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
 libavcodec/libutvideoenc.cpp |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/libutvideoenc.cpp b/libavcodec/libutvideoenc.cpp
index 3298e64..3deb1c7 100644
--- a/libavcodec/libutvideoenc.cpp
+++ b/libavcodec/libutvideoenc.cpp
@@ -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);
     }
 
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list