diff options
author | Bryce McKinlay <bryce@waitaki.otago.ac.nz> | 2002-03-30 03:30:36 +0000 |
---|---|---|
committer | Bryce McKinlay <bryce@gcc.gnu.org> | 2002-03-30 03:30:36 +0000 |
commit | a8f55e51dc39def431e74d22146d714532a9f8f8 (patch) | |
tree | 87ca3483bb03778b27f8a8e343896cd5510a4f1e /libiberty | |
parent | 70d95bac49e84db50ff05e93326062a239d3d1d5 (diff) | |
download | gcc-a8f55e51dc39def431e74d22146d714532a9f8f8.tar.gz |
cp-demangle.c (java_demangle_v3): Don't try to release "demangled" if it is NULL.
* cp-demangle.c (java_demangle_v3): Don't try to release "demangled"
if it is NULL.
From-SVN: r51594
Diffstat (limited to 'libiberty')
-rw-r--r-- | libiberty/ChangeLog | 5 | ||||
-rw-r--r-- | libiberty/cp-demangle.c | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 50a323f1bef..bc943fe0dc9 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,8 @@ +2002-03-30 Bryce McKinlay <bryce@waitaki.otago.ac.nz> + + * cp-demangle.c (java_demangle_v3): Don't try to release "demangled" + if it is NULL. + 2002-03-27 DJ Delorie <dj@redhat.com> * hex.c: Add documentation. diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c index 28d36413582..a130fd8374c 100644 --- a/libiberty/cp-demangle.c +++ b/libiberty/cp-demangle.c @@ -3846,7 +3846,11 @@ java_demangle_v3 (mangled) free (cplus_demangled); - return_value = dyn_string_release (demangled); + if (demangled) + return_value = dyn_string_release (demangled); + else + return_value = NULL; + return return_value; } |