mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2025-02-20 04:41:37 +00:00
lavc/avfft: init context to 0.
Prevent an invalid free in case of init failure.
This commit is contained in:
parent
83635ac67b
commit
04dcdc4640
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user