From 993a2487de7d53d5787d2267ddadd588e24e89ca Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 19 Oct 2014 03:03:04 +0200 Subject: [PATCH] avcodec/nellymoserenc: use av_freep(), do not leave stale pointers in memory Signed-off-by: Michael Niedermayer --- libavcodec/nellymoserenc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/nellymoserenc.c b/libavcodec/nellymoserenc.c index 4f511c292b..9bbdd52426 100644 --- a/libavcodec/nellymoserenc.c +++ b/libavcodec/nellymoserenc.c @@ -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);