summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2010-08-17 15:08:36 +0000
committerSimon Marlow <marlowsd@gmail.com>2010-08-17 15:08:36 +0000
commitaecb51e1bbecef1872f9a3bb11856f39fa291f15 (patch)
treec6f5f1d0c10cc849caa073d1faf9d2733071f56a /rts
parent5d6318b8c5f67327e35e174c7b6588bc2590e33c (diff)
downloadhaskell-aecb51e1bbecef1872f9a3bb11856f39fa291f15.tar.gz
stgReallocBytes(DEBUG): don't fail when the ptr passed in is NULL
Diffstat (limited to 'rts')
-rw-r--r--rts/RtsUtils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/RtsUtils.c b/rts/RtsUtils.c
index eee7594143..e9da59f545 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;