public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix memory leak in DOM
@ 2004-10-12 14:43 Andrew Pinski
  2004-10-12 17:53 ` Diego Novillo
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Pinski @ 2004-10-12 14:43 UTC (permalink / raw)
  To: GCC Patches

A simple memory leak plug.

OK? Bootstrapped and tested on powerpc-darwin.


ChangeLog:
	* tree-ssa-dom.c (record_range): Free the element if we are not
	going to use it.

Index: tree-ssa-dom.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-dom.c,v
retrieving revision 2.58
diff -u -p -r2.58 tree-ssa-dom.c
--- tree-ssa-dom.c	4 Oct 2004 13:19:20 -0000	2.58
+++ tree-ssa-dom.c	12 Oct 2004 14:39:46 -0000
@@ -3013,6 +3013,8 @@ record_range (tree cond, basic_block bb)

        if (*slot == NULL)
  	*slot = (void *) vrp_hash_elt;
+      else
+	free (vrp_hash_elt);

        vrp_hash_elt = (struct vrp_hash_elt *) *slot;
        vrp_records_p = &vrp_hash_elt->records;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix memory leak in DOM
  2004-10-12 14:43 [PATCH] Fix memory leak in DOM Andrew Pinski
@ 2004-10-12 17:53 ` Diego Novillo
  0 siblings, 0 replies; 2+ messages in thread
From: Diego Novillo @ 2004-10-12 17:53 UTC (permalink / raw)
  To: Andrew Pinski; +Cc: GCC Patches

On Tue, 2004-10-12 at 10:41, Andrew Pinski wrote:

> 	* tree-ssa-dom.c (record_range): Free the element if we are not
> 	going to use it.
> 
OK.  Thanks.


Diego.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-10-12 17:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-12 14:43 [PATCH] Fix memory leak in DOM Andrew Pinski
2004-10-12 17:53 ` Diego Novillo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).