aboutsummaryrefslogtreecommitdiff
path: root/gcc/except.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>1999-09-09 00:17:20 -0700
committerRichard Henderson <rth@gcc.gnu.org>1999-09-09 00:17:20 -0700
commita9f0664a5a61777ecc51848e2e2878effdd65aaa (patch)
treeabe825dcb64acc0256a2dcbce0a8a950594719d8 /gcc/except.c
parent76095e2f540a989ea6ff09bdce8d16c648ceca50 (diff)
downloadgcc-a9f0664a5a61777ecc51848e2e2878effdd65aaa.zip
gcc-a9f0664a5a61777ecc51848e2e2878effdd65aaa.tar.gz
gcc-a9f0664a5a61777ecc51848e2e2878effdd65aaa.tar.bz2
except.c (find_all_handler_type_matches): Free the list if we found no matches.
* except.c (find_all_handler_type_matches): Free the list if we found no matches. From-SVN: r29227
Diffstat (limited to 'gcc/except.c')
-rw-r--r--gcc/except.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/except.c b/gcc/except.c
index ca2c89d..98dba0c 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -844,6 +844,12 @@ find_all_handler_type_matches (array)
}
}
}
+
+ if (n_ptr == 0)
+ {
+ free (ptr);
+ ptr = NULL;
+ }
*array = ptr;
return n_ptr;
}