mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
avcodec/ffwavesynth: Use av_freep() to avoid leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
ac08c5c0ad
commit
748ad112e2
@ -345,8 +345,8 @@ static av_cold int wavesynth_init(AVCodecContext *avc)
|
||||
return 0;
|
||||
|
||||
fail:
|
||||
av_free(ws->inter);
|
||||
av_free(ws->sin);
|
||||
av_freep(&ws->inter);
|
||||
av_freep(&ws->sin);
|
||||
return r;
|
||||
}
|
||||
|
||||
@ -463,8 +463,8 @@ static av_cold int wavesynth_close(AVCodecContext *avc)
|
||||
{
|
||||
struct wavesynth_context *ws = avc->priv_data;
|
||||
|
||||
av_free(ws->sin);
|
||||
av_free(ws->inter);
|
||||
av_freep(&ws->sin);
|
||||
av_freep(&ws->inter);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user