avcodec/mpegaudiodec_template: use av_freep(), do not leave stale pointers in memory
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 19 Oct 2014 01:03:04 +0000 (03:03 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 19 Oct 2014 01:03:40 +0000 (03:03 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/mpegaudiodec_template.c

index c4c03d910636855b0b2a3be251cae01166652591..1c97d724f41c5457700c6c78c7be75595cad2bc9 100644 (file)
@@ -1819,7 +1819,7 @@ static av_cold int decode_close_mp3on4(AVCodecContext * avctx)
     int i;
 
     for (i = 0; i < s->frames; i++)
-        av_free(s->mp3decctx[i]);
+        av_freep(&s->mp3decctx[i]);
 
     return 0;
 }