From 91ff05f6ac5c65a6cd3701d5a7cdcfb6ccfd87e4 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 7 May 2011 15:28:07 +0200 Subject: [PATCH] Make av_realloc(0) behave like our av_malloc(0) Signed-off-by: Michael Niedermayer --- libavutil/mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/mem.c b/libavutil/mem.c index 965daa93c8..83e8c35561 100644 --- a/libavutil/mem.c +++ b/libavutil/mem.c @@ -132,7 +132,7 @@ void *av_realloc(void *ptr, size_t size) diff= ((char*)ptr)[-1]; return (char*)realloc((char*)ptr - diff, size + diff) + diff; #else - return realloc(ptr, size); + return realloc(ptr, size + !size); #endif }