X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fmimic.c;h=31d63931a24c64b15e0486a6cb51a191e9bc8104;hb=2974050cf5783e3a7eddbd7324e4277d4eddf11f;hp=a1cb5e7ad3be038c5a332d2bc7cc33807e424d57;hpb=e93523a06f27e08bf43725f49c179e0bab2c69cb;p=ffmpeg diff --git a/libavcodec/mimic.c b/libavcodec/mimic.c index a1cb5e7ad3b..31d63931a24 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)