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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-10-08 16:09:05 +02:00
parent f66fed6c42
commit fa8c6c1350

View File

@ -67,7 +67,7 @@ typedef struct ATRAC3PContext {
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;
}