[FFmpeg-cvslog] avfilter/vf_colormatrix: fix memleak on error

Michael Niedermayer git at videolan.org
Tue Apr 8 02:44:59 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Apr  8 01:25:00 2014 +0200| [e36aaeca3a3043b95a02ced3f0e36643132e2e60] | committer: Michael Niedermayer

avfilter/vf_colormatrix: fix memleak on error

Fixes CID1197065
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e36aaeca3a3043b95a02ced3f0e36643132e2e60
---

 libavfilter/vf_colormatrix.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavfilter/vf_colormatrix.c b/libavfilter/vf_colormatrix.c
index 43654ae..5ab175b 100644
--- a/libavfilter/vf_colormatrix.c
+++ b/libavfilter/vf_colormatrix.c
@@ -353,6 +353,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
         case AVCOL_SPC_BT470BG   : source = COLOR_MODE_BT601     ; break;
         default :
             av_log(ctx, AV_LOG_ERROR, "Input frame does not specify a supported colorspace, and none has been specified as source either\n");
+            av_frame_free(&out);
             return AVERROR(EINVAL);
         }
         color->mode = source * 4 + color->dest;



More information about the ffmpeg-cvslog mailing list