avcodec/atrac3plusdec: use av_freep(), do not leave stale pointers in memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/87/head
Michael Niedermayer 10 years ago
parent f66fed6c42
commit fa8c6c1350
  1. 2
      libavcodec/atrac3plusdec.c

@ -67,7 +67,7 @@ typedef struct ATRAC3PContext {
static av_cold int atrac3p_decode_close(AVCodecContext *avctx) static av_cold int atrac3p_decode_close(AVCodecContext *avctx)
{ {
av_free(((ATRAC3PContext *)(avctx->priv_data))->ch_units); av_freep(&((ATRAC3PContext *)(avctx->priv_data))->ch_units);
return 0; return 0;
} }

Loading…
Cancel
Save