avcodec/nellymoserenc: 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:04 +0000 (03:03 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/nellymoserenc.c

index 4f511c2..9bbdd52 100644 (file)
@@ -138,8 +138,8 @@ static av_cold int encode_end(AVCodecContext *avctx)
     ff_mdct_end(&s->mdct_ctx);
 
     if (s->avctx->trellis) {
-        av_free(s->opt);
-        av_free(s->path);
+        av_freep(&s->opt);
+        av_freep(&s->path);
     }
     ff_af_queue_close(&s->afq);