[FFmpeg-devel] [PATCH v4 1/3] avfilter/asrc_sinc: fix leak in config_input()

Michael Niedermayer michael at niedermayer.cc
Sat Jul 5 14:25:08 EEST 2025


On Mon, Jun 30, 2025 at 11:01:12PM +0800, Lidong Yan wrote:
> In config_input(), fir_to_phase() allocates memory in h[longer], which
> would leak if av_calloc() to s->coeffs failed. lpf() allocates memory
> in h[0] and h[1], which would leak if fir_to_phase() failed. To fix
> this leak, add av_free(h[longer]) in as cleanup code, and replace
> return AVERROR* with goto cleanup to prevent from leaks.
> 
> Signed-off-by: Lidong Yan <502024330056 at smail.nju.edu.cn>
> ---
>  libavfilter/asrc_sinc.c | 18 +++++++++++-------
>  1 file changed, 11 insertions(+), 7 deletions(-)

will apply

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you fake or manipulate statistics in a paper in physics you will never
get a job again.
If you fake or manipulate statistics in a paper in medicin you will get
a job for life at the pharma industry.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250705/5c5f5522/attachment.sig>


More information about the ffmpeg-devel mailing list