summaryrefslogtreecommitdiff
path: root/libavcodec/avfft.c
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2013-08-22 20:25:09 +0200
committerNicolas George <nicolas.george@normalesup.org>2013-09-04 16:37:25 +0200
commit04dcdc464087eece349f30db42bab903cd077778 (patch)
treece42bbb4d09ed66d589bd4cc6623b5883ca2caa0 /libavcodec/avfft.c
parent83635ac67bc3429c147e214f0f44325b63832384 (diff)
lavc/avfft: init context to 0.
Prevent an invalid free in case of init failure.
Diffstat (limited to 'libavcodec/avfft.c')
-rw-r--r--libavcodec/avfft.c2
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);