This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[tree-ssa] fix memory leak in tree-into-ssa.c


Just like the fix for tree-ssa-alias.c, some bitmaps were not
being freed as they are allocated with xmalloc.

Thanks,
Andrew Pinski


ChangeLog:


	* tree-into-ssa.c (def_blocks_free): XFREE bitmaps allocated
	with BITMAP_XMALLOC.

Patch:
Index: tree-into-ssa.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-into-ssa.c,v
retrieving revision 1.1.2.8
diff -u -p -r1.1.2.8 tree-into-ssa.c
--- tree-into-ssa.c	22 Apr 2004 16:41:13 -0000	1.1.2.8
+++ tree-into-ssa.c	7 May 2004 14:28:31 -0000
@@ -883,8 +883,8 @@ static void
 def_blocks_free (void *p)
 {
   struct def_blocks_d *entry = p;
-  BITMAP_FREE (entry->def_blocks);
-  BITMAP_FREE (entry->livein_blocks);
+  BITMAP_XFREE (entry->def_blocks);
+  BITMAP_XFREE (entry->livein_blocks);
   free (entry);
 }

Attachment: fixintosse.diff.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]