diff options
Diffstat (limited to 'gcc/cppalloc.c')
-rw-r--r-- | gcc/cppalloc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/cppalloc.c b/gcc/cppalloc.c index 880a56d..07b6ce1 100644 --- a/gcc/cppalloc.c +++ b/gcc/cppalloc.c @@ -60,7 +60,11 @@ xrealloc (old, size) PTR old; size_t size; { - register PTR ptr = (PTR) realloc (old, size); + register PTR ptr; + if (ptr) + ptr = (PTR) realloc (old, size); + else + ptr = (PTR) malloc (size); if (ptr == 0) memory_full (); return ptr; |