mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-25 16:52:31 +00:00
avfilter/avf_showfreqs: Fix memleak of out frame
Fixes CID1322344 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
0ada8ec1a5
commit
8ca97b5e4f
@ -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 };
|
||||
|
Loading…
Reference in New Issue
Block a user