except.c (find_all_handler_type_matches): Free the list if we found no matches.
authorRichard Henderson <rth@cygnus.com>
Thu, 9 Sep 1999 07:17:20 +0000 (00:17 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Thu, 9 Sep 1999 07:17:20 +0000 (00:17 -0700)
        * except.c (find_all_handler_type_matches): Free the list if
        we found no matches.

From-SVN: r29227

gcc/ChangeLog
gcc/except.c

index 589c7244c633e9908a91b1baab958efea0cc5705..a73b78a8e6af1878e38da96be23ffac61e00275f 100644 (file)
@@ -1,5 +1,8 @@
 Wed Sep  8 23:53:22 1999  Richard Henderson  <rth@cygnus.com>
 
+       * 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'.
index ca2c89d8df6a8d71d74b7dabfa6b552c91072e06..98dba0cb5dafc79d0f89c71536d2315cbea60874 100644 (file)
@@ -844,6 +844,12 @@ find_all_handler_type_matches (array)
             }
         }
     }
+
+  if (n_ptr == 0)
+    {
+      free (ptr);
+      ptr = NULL;
+    }
   *array = ptr;
   return n_ptr;
 }