aboutsummaryrefslogtreecommitdiff
path: root/libiberty/cp-demint.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2011-04-20 19:06:46 +0000
committerDJ Delorie <dj@redhat.com>2011-04-20 19:06:46 +0000
commit4ff224cb8d9347245ffea0f5853d862f0574452e (patch)
treef0ad924656bb6f1332030f73e18939949db327f0 /libiberty/cp-demint.c
parente7782cf63b834cc4c4d159dcb6e3a9908b12432f (diff)
downloadgdb-4ff224cb8d9347245ffea0f5853d862f0574452e.zip
gdb-4ff224cb8d9347245ffea0f5853d862f0574452e.tar.gz
gdb-4ff224cb8d9347245ffea0f5853d862f0574452e.tar.bz2
merge from gcc
Diffstat (limited to 'libiberty/cp-demint.c')
-rw-r--r--libiberty/cp-demint.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libiberty/cp-demint.c b/libiberty/cp-demint.c
index 2e8f8d2..1d1a77a 100644
--- a/libiberty/cp-demint.c
+++ b/libiberty/cp-demint.c
@@ -206,10 +206,8 @@ cplus_demangle_v3_components (const char *mangled, int options, void **mem)
malloc (di.num_subs * sizeof (struct demangle_component *)));
if (di.comps == NULL || di.subs == NULL)
{
- if (di.comps != NULL)
- free (di.comps);
- if (di.subs != NULL)
- free (di.subs);
+ free (di.comps);
+ free (di.subs);
return NULL;
}