From: Richard Henderson Date: Thu, 9 Sep 1999 07:17:20 +0000 (-0700) Subject: except.c (find_all_handler_type_matches): Free the list if we found no matches. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a9f0664a5a61777ecc51848e2e2878effdd65aaa;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 589c7244c63..a73b78a8e6a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ Wed Sep 8 23:53:22 1999 Richard Henderson + * except.c (find_all_handler_type_matches): Free the list if + we found no matches. + * combine.c (SUBST): Break out to a real function do_SUBST. (SUBST_INT): Likewise. * gcse.c (free_pre_mem): Free `temp_bitmap'. diff --git a/gcc/except.c b/gcc/except.c index ca2c89d8df6..98dba0cb5da 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; }