From 04dcdc464087eece349f30db42bab903cd077778 Mon Sep 17 00:00:00 2001 From: Nicolas George Date: Thu, 22 Aug 2013 20:25:09 +0200 Subject: [PATCH] lavc/avfft: init context to 0. Prevent an invalid free in case of init failure. --- libavcodec/avfft.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/avfft.c b/libavcodec/avfft.c index 26b3d4b2d2..2200f37708 100644 --- a/libavcodec/avfft.c +++ b/libavcodec/avfft.c @@ -27,7 +27,7 @@ FFTContext *av_fft_init(int nbits, int inverse) { - FFTContext *s = av_malloc(sizeof(*s)); + FFTContext *s = av_mallocz(sizeof(*s)); if (s && ff_fft_init(s, nbits, inverse)) av_freep(&s);