[FFmpeg-devel] [PATCH 2/4] avfilter/asrc_sinc: fix leak in config_input()
ld y
yldhome2d2 at gmail.com
Wed Jun 25 04:43:14 EEST 2025
Michael Niedermayer <michael at niedermayer.cc> writes:
> doesnt the failure path here need the free too ?
> int ret = fir_to_phase(s, &h[longer], &n, &post_peak, s->phase);
> if (ret < 0)
> return ret;
>
I checked fir_to_phase() and found that the only place it allocates memory
in
h[longer] is vis
*h = av_realloc_f();
If fir_to_phase() failed after this allocations, then *h must be NULL,
which implies that av_realloc_f() failed. In that case, we don't need to
av_free(h[longer]). However, I still need to double check other allocation
site
in case we need to free more memory.
Thanks,
Lidong
More information about the ffmpeg-devel
mailing list