summaryrefslogtreecommitdiff
path: root/libavfilter/vf_signalstats.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-12-06 16:57:23 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-12-06 17:05:20 +0100
commit7ad742b2247a0d6f742a656892b4963fa77744dd (patch)
treeb9645d2f4d0f130e8e2c185b49ebab29f2b523f2 /libavfilter/vf_signalstats.c
parent8280b7db478206dafa370152d4f67f5e062ac229 (diff)
downloadffmpeg-7ad742b2247a0d6f742a656892b4963fa77744dd.tar.gz
avfilter/vf_signalstats: fix avframe leak on error
Fixes CID1257014 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_signalstats.c')
-rw-r--r--libavfilter/vf_signalstats.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/vf_signalstats.c b/libavfilter/vf_signalstats.c
index 4b2792f117..8632761cc3 100644
--- a/libavfilter/vf_signalstats.c
+++ b/libavfilter/vf_signalstats.c
@@ -132,8 +132,10 @@ static AVFrame *alloc_frame(enum AVPixelFormat pixfmt, int w, int h)
frame->width = w;
frame->height = h;
- if (av_frame_get_buffer(frame, 32) < 0)
+ if (av_frame_get_buffer(frame, 32) < 0) {
+ av_frame_free(&frame);
return NULL;
+ }
return frame;
}