diff options
author | David Malcolm <dmalcolm@redhat.com> | 2013-10-10 18:11:41 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2013-10-10 18:11:41 +0000 |
commit | b591a8b78c5e66da7a4536f823d31b56005be77f (patch) | |
tree | 911a947f8d79918ffa81f8f48ad2afd8c73eda44 | |
parent | 782f0db2f5e230c7e3d2089bd5b5d698ec210d68 (diff) | |
download | gcc-b591a8b78c5e66da7a4536f823d31b56005be77f.zip gcc-b591a8b78c5e66da7a4536f823d31b56005be77f.tar.gz gcc-b591a8b78c5e66da7a4536f823d31b56005be77f.tar.bz2 |
ipa-inline.c:ipa_inline: Fix leak of "order" when optimizations are disabled.
2013-10-10 David Malcolm <dmalcolm@redhat.com>
* ipa-inline.c (ipa_inline): Fix leak of "order" when
optimizations are disabled.
From-SVN: r203389
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ipa-inline.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 52e36d4..654946a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2013-10-10 David Malcolm <dmalcolm@redhat.com> + * ipa-inline.c (ipa_inline): Fix leak of "order" when + optimizations are disabled. + +2013-10-10 David Malcolm <dmalcolm@redhat.com> + * coverage.c (coverage_finish): Fix leak of da_file_name. 2013-10-10 Jan Hubicka <jh@suse.cz> diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index 7735bb9..4822c38 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -1962,8 +1962,7 @@ ipa_inline (void) { struct cgraph_node *node; int nnodes; - struct cgraph_node **order = - XCNEWVEC (struct cgraph_node *, cgraph_n_nodes); + struct cgraph_node **order; int i; int cold; bool remove_functions = false; @@ -1971,6 +1970,8 @@ ipa_inline (void) if (!optimize) return 0; + order = XCNEWVEC (struct cgraph_node *, cgraph_n_nodes); + if (in_lto_p && optimize) ipa_update_after_lto_read (); |