Browse Source

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.6
Michael Niedermayer 11 years ago
parent
commit
748ad112e2
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      libavcodec/ffwavesynth.c

+ 4
- 4
libavcodec/ffwavesynth.c View File

@@ -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…
Cancel
Save