diff options
| author | Simon Marlow <marlowsd@gmail.com> | 2010-08-17 15:08:36 +0000 | 
|---|---|---|
| committer | Simon Marlow <marlowsd@gmail.com> | 2010-08-17 15:08:36 +0000 | 
| commit | aecb51e1bbecef1872f9a3bb11856f39fa291f15 (patch) | |
| tree | c6f5f1d0c10cc849caa073d1faf9d2733071f56a /rts/RtsUtils.c | |
| parent | 5d6318b8c5f67327e35e174c7b6588bc2590e33c (diff) | |
| download | haskell-aecb51e1bbecef1872f9a3bb11856f39fa291f15.tar.gz | |
stgReallocBytes(DEBUG): don't fail when the ptr passed in is NULL
Diffstat (limited to 'rts/RtsUtils.c')
| -rw-r--r-- | rts/RtsUtils.c | 2 | 
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; | 
