Mercurial > libavcodec.hg
changeset 12151:fb37ee915b73 libavcodec
avfft: make init functions return NULL on failure as intended
author | mru |
---|---|
date | Mon, 12 Jul 2010 19:54:16 +0000 |
parents | 30867f2c9009 |
children | d102b12f69dc |
files | avfft.c |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/avfft.c Mon Jul 12 19:36:35 2010 +0000 +++ b/avfft.c Mon Jul 12 19:54:16 2010 +0000 @@ -28,6 +28,8 @@ if (s) ff_fft_init(s, nbits, inverse); + else + av_freep(&s); return s; } @@ -58,6 +60,8 @@ if (s) ff_mdct_init(s, nbits, inverse, scale); + else + av_freep(&s); return s; } @@ -95,6 +99,8 @@ if (s) ff_rdft_init(s, nbits, trans); + else + av_freep(&s); return s; } @@ -122,6 +128,8 @@ if (s) ff_dct_init(s, nbits, inverse); + else + av_freep(&s); return s; }