Commit 748ad112 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/ffwavesynth: Use av_freep() to avoid leaving stale pointers in memory

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent ac08c5c0
...@@ -345,8 +345,8 @@ static av_cold int wavesynth_init(AVCodecContext *avc) ...@@ -345,8 +345,8 @@ static av_cold int wavesynth_init(AVCodecContext *avc)
return 0; return 0;
fail: fail:
av_free(ws->inter); av_freep(&ws->inter);
av_free(ws->sin); av_freep(&ws->sin);
return r; return r;
} }
...@@ -463,8 +463,8 @@ static av_cold int wavesynth_close(AVCodecContext *avc) ...@@ -463,8 +463,8 @@ static av_cold int wavesynth_close(AVCodecContext *avc)
{ {
struct wavesynth_context *ws = avc->priv_data; struct wavesynth_context *ws = avc->priv_data;
av_free(ws->sin); av_freep(&ws->sin);
av_free(ws->inter); av_freep(&ws->inter);
return 0; return 0;
} }
......
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