This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
[patch] identify_blocks memory leak
- To: egcs at cygnus dot com
- Subject: [patch] identify_blocks memory leak
- From: Bruno Haible <haible at ilog dot fr>
- Date: Thu, 26 Feb 1998 15:56:07 +0100 (MET)
Currently, identify_blocks() leaks memory: The block_vector is never freed.
The following fix passes the testsuite on i486-linux.
Thu Feb 26 13:56:09 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
* function.c (reorder_blocks): Free the memory allocated by
identify_blocks.
*** egcs-980214/gcc/function.c.bak Sun Feb 22 10:34:52 1998
--- egcs-980214/gcc/function.c Wed Feb 25 11:05:35 1998
*************** reorder_blocks (block_vector, block, ins
*** 5080,5085 ****
--- 5080,5087 ----
}
}
+ free (block_vector);
+
BLOCK_SUBBLOCKS (current_block)
= blocks_nreverse (BLOCK_SUBBLOCKS (current_block));
return current_block;