Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-09-05 16:35:37 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2015-09-05 16:46:18 +0300
commit8ca97b5e4f470cf24fac5e0599dd63c7af142c22 (patch)
tree766c3e15a326b020ee3b67fef360266be8e102aa /libavfilter/avf_showfreqs.c
parent0ada8ec1a50c0ec157988f0a166adf977b482d37 (diff)
avfilter/avf_showfreqs: Fix memleak of out frame
Fixes CID1322344 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavfilter/avf_showfreqs.c')
-rw-r--r--libavfilter/avf_showfreqs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/avf_showfreqs.c b/libavfilter/avf_showfreqs.c
index 1bbaa92a99..c00e4d8633 100644
--- a/libavfilter/avf_showfreqs.c
+++ b/libavfilter/avf_showfreqs.c
@@ -452,8 +452,10 @@ static int plot_freqs(AVFilterLink *inlink, AVFrame *in)
#define M(a, b) (sqrt((a) * (a) + (b) * (b)))
colors = av_strdup(s->colors);
- if (!colors)
+ if (!colors) {
+ av_frame_free(&out);
return AVERROR(ENOMEM);
+ }
for (ch = 0; ch < s->nb_channels; ch++) {
uint8_t fg[4] = { 0xff, 0xff, 0xff, 0xff };