From: Simon Marlow Date: Tue, 17 Aug 2010 15:08:36 +0000 (+0000) Subject: stgReallocBytes(DEBUG): don't fail when the ptr passed in is NULL X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=aecb51e1bbecef1872f9a3bb11856f39fa291f15 stgReallocBytes(DEBUG): don't fail when the ptr passed in is NULL --- diff --git a/rts/RtsUtils.c b/rts/RtsUtils.c index eee7594..e9da59f 100644 --- a/rts/RtsUtils.c +++ b/rts/RtsUtils.c @@ -219,7 +219,7 @@ stgReallocBytes (void *p, int n, char *msg) stg_exit(EXIT_INTERNAL_ERROR); } #if defined(DEBUG) - removeAllocation(p, 0); + if (p != NULL) { removeAllocation(p, 0); } addAllocation(space, n2); #endif return space;