From a9f0664a5a61777ecc51848e2e2878effdd65aaa Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 9 Sep 1999 00:17:20 -0700 Subject: [PATCH] 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 --- gcc/ChangeLog | 3 +++ gcc/except.c | 6 ++++++ 2 files changed, 9 insertions(+) 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; } -- 2.30.2