[FFmpeg-cvslog] avfilter/af_afftdn: fix small memory leak
Paul B Mahol
git at videolan.org
Sat Mar 12 13:11:46 EET 2022
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat Mar 12 12:06:31 2022 +0100| [4a8b62c29a489b40c848714141b661733f585443] | committer: Paul B Mahol
avfilter/af_afftdn: fix small memory leak
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4a8b62c29a489b40c848714141b661733f585443
---
libavfilter/af_afftdn.c | 6 +++---
1 file 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));
}
More information about the ffmpeg-cvslog
mailing list