X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavfilter%2Fasrc_sinc.c;h=90f043d680d01d5b744eae2a41dcce5d8cc8eaae;hb=76ef2ec4715b296019cef40eb18d4fbd226b3d7f;hp=0135eb9023ba0da7fd1bc38742bd7a45c4ef2630;hpb=fda424b300c1a0b991296aa585691609d01196bd;p=ffmpeg diff --git a/libavfilter/asrc_sinc.c b/libavfilter/asrc_sinc.c index 0135eb9023b..90f043d680d 100644 --- a/libavfilter/asrc_sinc.c +++ b/libavfilter/asrc_sinc.c @@ -239,8 +239,11 @@ static int fir_to_phase(SincContext *s, float **h, int *len, int *post_len, floa s->rdft = s->irdft = NULL; s->rdft = av_rdft_init(av_log2(work_len), DFT_R2C); s->irdft = av_rdft_init(av_log2(work_len), IDFT_C2R); - if (!s->rdft || !s->irdft) + if (!s->rdft || !s->irdft) { + av_free(pi_wraps); + av_free(work); return AVERROR(ENOMEM); + } av_rdft_calc(s->rdft, work); /* Cepstral: */ UNPACK(work, work_len);