diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 28f39927ad..feb0379bc1 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,8 @@ +2002-03-30 Bryce McKinlay + + * cp-demangle.c (java_demangle_v3): Don't try to release "demangled" + if it is NULL. + 2002-03-27 DJ Delorie * hex.c: Add documentation. diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c index 28d3641358..a130fd8374 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; }