Commit 04dcdc46 authored by Nicolas George's avatar Nicolas George

lavc/avfft: init context to 0.

Prevent an invalid free in case of init failure.
parent 83635ac6
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment