[FFmpeg-devel] [PATCH] lavc/avfft: init context to 0.
Nicolas George
nicolas.george at normalesup.org
Fri Aug 23 15:49:41 CEST 2013
Prevent an invalid free in case of init failure.
Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
---
libavcodec/avfft.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/avfft.c b/libavcodec/avfft.c
index 26b3d4b..2200f37 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);
--
1.7.10.4
More information about the ffmpeg-devel
mailing list