merge from gcc
authorDJ Delorie <dj@redhat.com>
Sat, 30 Mar 2002 06:17:57 +0000 (06:17 +0000)
committerDJ Delorie <dj@redhat.com>
Sat, 30 Mar 2002 06:17:57 +0000 (06:17 +0000)
libiberty/ChangeLog
libiberty/cp-demangle.c

index 28f39927adaf1ad3bae08eb184c57a7e672ba556..feb0379bc1703376b21021984050dcf985845392 100644 (file)
@@ -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.
index 28d36413582629cfb58dcd9c38c1aa0358b3c42c..a130fd8374c3066b03a48038d0378873db169a65 100644 (file)
@@ -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;
 }