[tree-ssa] fix memory leak in tree-ssa-dom.c
Andrew Pinski
pinskia@physics.uc.edu
Fri May 7 14:16:00 GMT 2004
This simple patch fixes a memory leak in tree-ssa-dom.
Tested on powerpc-apple-darwin with no regressions and
the memory leak fixed.
ChangeLog:
* tree-ssa-dom.c (tree_ssa_dominator_optimize):
Free nonzero_vars at the end of the function.
Patch:
Index: tree-ssa-dom.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-ssa-dom.c,v
retrieving revision 1.1.2.161
diff -u -p -r1.1.2.161 tree-ssa-dom.c
--- tree-ssa-dom.c 5 May 2004 17:14:20 -0000 1.1.2.161
+++ tree-ssa-dom.c 7 May 2004 14:05:05 -0000
@@ -630,6 +630,9 @@ tree_ssa_dominator_optimize (void)
/* And finalize the dominator walker. */
fini_walk_dominator_tree (&walk_data);
+
+ /* Free nonzero_vars. */
+ BITMAP_XFREE (nonzero_vars);
}
static bool
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fix-dom-leak.diff.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20040507/74dca50c/attachment.txt>
More information about the Gcc-patches
mailing list