This is the mail archive of the gcc@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]

[patch] identify_blocks memory leak



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;


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