diff options
author | Bruce Korb <korbb@gcc.gnu.org> | 1999-11-04 14:50:44 +0000 |
---|---|---|
committer | Bruce Korb <korbb@gcc.gnu.org> | 1999-11-04 14:50:44 +0000 |
commit | 063174eeda2581061573010014d3f56eb040acb9 (patch) | |
tree | d392eace2cc7e2d1f6cf5fdaeff51b55cbd2408f /gcc/fixinc/fixlib.c | |
parent | eae48b73bd009146558a6033acd65eebd4f7d8d6 (diff) | |
download | gcc-063174eeda2581061573010014d3f56eb040acb9.zip gcc-063174eeda2581061573010014d3f56eb040acb9.tar.gz gcc-063174eeda2581061573010014d3f56eb040acb9.tar.bz2 |
Allow for systems that do not have S_IR* defined values
Do not call realloc with a NULL pointer
From-SVN: r30391
Diffstat (limited to 'gcc/fixinc/fixlib.c')
-rw-r--r-- | gcc/fixinc/fixlib.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/fixinc/fixlib.c b/gcc/fixinc/fixlib.c index 25a672e..85f9242 100644 --- a/gcc/fixinc/fixlib.c +++ b/gcc/fixinc/fixlib.c @@ -23,7 +23,10 @@ load_file_data (fp) if (space_left < 1024) { space_left += 4096; - pz_data = realloc ((void*)pz_data, space_left + space_used + 1 ); + if (pz_data) + pz_data = realloc ((void*)pz_data, space_left + space_used + 1 ); + else + pz_data = malloc (space_left + space_used + 1 ); } size_read = fread (pz_data + space_used, 1, space_left, fp); |