diff options
author | Nicolas George <nicolas.george@normalesup.org> | 2013-08-22 20:25:09 +0200 |
---|---|---|
committer | Nicolas George <nicolas.george@normalesup.org> | 2013-09-04 16:37:25 +0200 |
commit | 04dcdc464087eece349f30db42bab903cd077778 (patch) | |
tree | ce42bbb4d09ed66d589bd4cc6623b5883ca2caa0 /libavcodec | |
parent | 83635ac67bc3429c147e214f0f44325b63832384 (diff) | |
download | ffmpeg-04dcdc464087eece349f30db42bab903cd077778.tar.gz |
lavc/avfft: init context to 0.
Prevent an invalid free in case of init failure.
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/avfft.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |