This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Don't leak DEP_REPLACE memory (PR middle-end/56461)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Vladimir Makarov <vmakarov at redhat dot com>, Bernd Schmidt <bernds at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 26 Feb 2013 22:28:48 +0100
- Subject: [PATCH] Don't leak DEP_REPLACE memory (PR middle-end/56461)
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
DEP_REPLACE is never being freed. This patch fixes that.
Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
2013-02-26 Jakub Jelinek <jakub@redhat.com>
PR middle-end/56461
* sched-deps.c (delete_dep_node): Free DEP_REPLACE.
--- gcc/sched-deps.c.jj 2013-02-25 13:08:44.000000000 +0100
+++ gcc/sched-deps.c 2013-02-26 17:45:37.398849991 +0100
@@ -352,6 +352,8 @@ delete_dep_node (dep_node_t n)
gcc_assert (dep_link_is_detached_p (DEP_NODE_BACK (n))
&& dep_link_is_detached_p (DEP_NODE_FORW (n)));
+ XDELETE (DEP_REPLACE (DEP_NODE_DEP (n)));
+
--dn_pool_diff;
pool_free (dn_pool, n);
Jakub