summaryrefslogtreecommitdiff
path: root/libiberty/cp-demangle.c
diff options
context:
space:
mode:
authorbryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4>2002-03-30 03:30:36 +0000
committerbryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4>2002-03-30 03:30:36 +0000
commit87591c4a91481fdee9f44a2fefcd639fdf5bf913 (patch)
tree87ca3483bb03778b27f8a8e343896cd5510a4f1e /libiberty/cp-demangle.c
parent00e465b1dd095bccba7cc4f7b2eb357f220d69f3 (diff)
downloadgcc-87591c4a91481fdee9f44a2fefcd639fdf5bf913.tar.gz
* cp-demangle.c (java_demangle_v3): Don't try to release "demangled"
if it is NULL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51594 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty/cp-demangle.c')
-rw-r--r--libiberty/cp-demangle.c6
1 files changed, 5 insertions, 1 deletions
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;
}