[FFmpeg-cvslog] r24219 - trunk/libavcodec/avfft.c

mru subversion
Mon Jul 12 21:54:16 CEST 2010


Author: mru
Date: Mon Jul 12 21:54:16 2010
New Revision: 24219

Log:
avfft: make init functions return NULL on failure as intended

Modified:
   trunk/libavcodec/avfft.c

Modified: trunk/libavcodec/avfft.c
==============================================================================
--- trunk/libavcodec/avfft.c	Mon Jul 12 21:36:35 2010	(r24218)
+++ trunk/libavcodec/avfft.c	Mon Jul 12 21:54:16 2010	(r24219)
@@ -28,6 +28,8 @@ FFTContext *av_fft_init(int nbits, int i
 
     if (s)
         ff_fft_init(s, nbits, inverse);
+    else
+        av_freep(&s);
 
     return s;
 }
@@ -58,6 +60,8 @@ FFTContext *av_mdct_init(int nbits, int 
 
     if (s)
         ff_mdct_init(s, nbits, inverse, scale);
+    else
+        av_freep(&s);
 
     return s;
 }
@@ -95,6 +99,8 @@ RDFTContext *av_rdft_init(int nbits, enu
 
     if (s)
         ff_rdft_init(s, nbits, trans);
+    else
+        av_freep(&s);
 
     return s;
 }
@@ -122,6 +128,8 @@ DCTContext *av_dct_init(int nbits, enum 
 
     if (s)
         ff_dct_init(s, nbits, inverse);
+    else
+        av_freep(&s);
 
     return s;
 }



More information about the ffmpeg-cvslog mailing list