[FFmpeg-cvslog] lavc/avfft: init context to 0.

Nicolas George git at videolan.org
Wed Sep 4 16:54:32 CEST 2013


ffmpeg | branch: master | Nicolas George <nicolas.george at normalesup.org> | Thu Aug 22 20:25:09 2013 +0200| [04dcdc464087eece349f30db42bab903cd077778] | committer: Nicolas George

lavc/avfft: init context to 0.

Prevent an invalid free in case of init failure.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=04dcdc464087eece349f30db42bab903cd077778
---

 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);



More information about the ffmpeg-cvslog mailing list