aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/af_afftdn.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2022-03-12 12:06:31 +0100
committerPaul B Mahol <onemda@gmail.com>2022-03-12 12:12:25 +0100
commit4a8b62c29a489b40c848714141b661733f585443 (patch)
tree53789f8532b060abec6456dcc49c3aaf357f92b8 /libavfilter/af_afftdn.c
parent386e5e4cfcd2e1375ca028631cea172e8ea16e08 (diff)
downloadffmpeg-4a8b62c29a489b40c848714141b661733f585443.tar.gz
avfilter/af_afftdn: fix small memory leak
Diffstat (limited to 'libavfilter/af_afftdn.c')
-rw-r--r--libavfilter/af_afftdn.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavfilter/af_afftdn.c b/libavfilter/af_afftdn.c
index 2c642f3ae3..79c29cdde5 100644
--- a/libavfilter/af_afftdn.c
+++ b/libavfilter/af_afftdn.c
@@ -536,14 +536,14 @@ static void set_band_parameters(AudioFFTDeNoiseContext *s,
static void read_custom_noise(AudioFFTDeNoiseContext *s, int ch)
{
DeNoiseChannel *dnch = &s->dnch[ch];
- char *p, *arg, *saveptr = NULL;
+ char *custom_noise_str, *p, *arg, *saveptr = NULL;
double band_noise[NB_PROFILE_BANDS] = { 0.f };
int ret;
if (!s->band_noise_str)
return;
- p = av_strdup(s->band_noise_str);
+ custom_noise_str = p = av_strdup(s->band_noise_str);
if (!p)
return;
@@ -562,7 +562,7 @@ static void read_custom_noise(AudioFFTDeNoiseContext *s, int ch)
band_noise[i] = av_clipd(band_noise[i], -24., 24.);
}
- av_free(p);
+ av_free(custom_noise_str);
memcpy(dnch->band_noise, band_noise, sizeof(band_noise));
}