From: David Malcolm Date: Thu, 10 Oct 2013 18:11:41 +0000 (+0000) Subject: ipa-inline.c:ipa_inline: Fix leak of "order" when optimizations are disabled. X-Git-Tag: releases/gcc-4.9.0~3609 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b591a8b78c5e66da7a4536f823d31b56005be77f;p=thirdparty%2Fgcc.git ipa-inline.c:ipa_inline: Fix leak of "order" when optimizations are disabled. 2013-10-10 David Malcolm * ipa-inline.c (ipa_inline): Fix leak of "order" when optimizations are disabled. From-SVN: r203389 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 52e36d4bee89..654946a56513 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2013-10-10 David Malcolm + + * ipa-inline.c (ipa_inline): Fix leak of "order" when + optimizations are disabled. + 2013-10-10 David Malcolm * coverage.c (coverage_finish): Fix leak of da_file_name. diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index 7735bb9da7bb..4822c38ca58b 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 ();