From 8bd2b27f6b90c8c8cbde9f8d72245dd768b66f41 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 3 Dec 2011 04:50:35 +0100 Subject: [PATCH] zmbv: fix 2 memleaks Signed-off-by: Michael Niedermayer --- libavcodec/zmbv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/zmbv.c b/libavcodec/zmbv.c index 39549c9083..2eb12e8031 100644 --- a/libavcodec/zmbv.c +++ b/libavcodec/zmbv.c @@ -476,8 +476,8 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac return -1; } - c->cur = av_realloc(c->cur, avctx->width * avctx->height * (c->bpp / 8)); - c->prev = av_realloc(c->prev, avctx->width * avctx->height * (c->bpp / 8)); + c->cur = av_realloc_f(c->cur, avctx->width * avctx->height, (c->bpp / 8)); + c->prev = av_realloc_f(c->prev, avctx->width * avctx->height, (c->bpp / 8)); c->bx = (c->width + c->bw - 1) / c->bw; c->by = (c->height+ c->bh - 1) / c->bh; if(!c->cur || !c->prev)