From: karl.beldan@gmail.com Date: Tue, 6 Apr 2010 20:18:08 +0000 (+0200) Subject: malloc: sbrk() should return MORECORE_FAILURE instead of NULL on failure X-Git-Tag: v2010.06-rc1~112 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ae30b8c200dc071d719ad649d0bf5635d61754f3;p=platform%2Fkernel%2Fu-boot.git malloc: sbrk() should return MORECORE_FAILURE instead of NULL on failure Signed-off-by: Karl Beldan --- diff --git a/common/dlmalloc.c b/common/dlmalloc.c index 205fc40..2276532 100644 --- a/common/dlmalloc.c +++ b/common/dlmalloc.c @@ -1515,7 +1515,7 @@ void *sbrk(ptrdiff_t increment) ulong new = old + increment; if ((new < mem_malloc_start) || (new > mem_malloc_end)) - return NULL; + return (void *)MORECORE_FAILURE; mem_malloc_brk = new;