[FFmpeg-cvslog] zmbv: fix 2 memleaks

Michael Niedermayer git at videolan.org
Sat Dec 3 05:34:51 CET 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Dec  3 04:50:35 2011 +0100| [8bd2b27f6b90c8c8cbde9f8d72245dd768b66f41] | committer: Michael Niedermayer

zmbv: fix 2 memleaks

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8bd2b27f6b90c8c8cbde9f8d72245dd768b66f41
---

 libavcodec/zmbv.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/zmbv.c b/libavcodec/zmbv.c
index 39549c9..2eb12e8 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)



More information about the ffmpeg-cvslog mailing list