From b8f276e6457413530a38a16a4e79988932d7e661 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Fri, 8 Nov 2013 14:23:45 +0000 Subject: [PATCH] avcodec/mimic: use av_freep() and reset swap_buf_size Signed-off-by: Paul B Mahol --- libavcodec/mimic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/mimic.c b/libavcodec/mimic.c index a1cb5e7ad3..31d63931a2 100644 --- a/libavcodec/mimic.c +++ b/libavcodec/mimic.c @@ -116,7 +116,8 @@ static av_cold int mimic_decode_end(AVCodecContext *avctx) MimicContext *ctx = avctx->priv_data; int i; - av_free(ctx->swap_buf); + av_freep(&ctx->swap_buf); + ctx->swap_buf_size = 0; for (i = 0; i < FF_ARRAY_ELEMS(ctx->frames); i++) { if (ctx->frames[i].f)