1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-15 14:13:16 +02:00

lavc/avfft: init context to 0.

Prevent an invalid free in case of init failure.
This commit is contained in:
Nicolas George
2013-08-22 20:25:09 +02:00
parent 83635ac67b
commit 04dcdc4640

View File

@@ -27,7 +27,7 @@
FFTContext *av_fft_init(int nbits, int inverse) 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)) if (s && ff_fft_init(s, nbits, inverse))
av_freep(&s); av_freep(&s);