This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] [committed] Fix leak in loop-unswitch.c
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: "gcc-patches at gcc dot gnu dot org Patches" <gcc-patches at gcc dot gnu dot org>
- Cc: Andrew Pinski <pinskia at physics dot uc dot edu>
- Date: Thu, 13 May 2004 18:01:26 -0400
- Subject: [PATCH] [committed] Fix leak in loop-unswitch.c
Patch says it all.
Committed as obvious.
Thanks,
Andrew Pinski
ChangeLog:
* loop-unswitch.c (unswitch_single_loop): Free bbs at
the end.
Patch:
Index: loop-unswitch.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/loop-unswitch.c,v
retrieving revision 1.16
diff -u -p -r1.16 loop-unswitch.c
--- loop-unswitch.c 24 Feb 2004 23:39:55 -0000 1.16
+++ loop-unswitch.c 13 May 2004 22:01:10 -0000
@@ -379,6 +379,8 @@ unswitch_single_loop (struct loops *loop
free_EXPR_LIST_node (conds);
if (rcond)
free_EXPR_LIST_node (rconds);
+
+ free (bbs);
}
/* Unswitch a LOOP w.r. to given basic block UNSWITCH_ON. We only
support