]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ipa-inline.c:ipa_inline: Fix leak of "order" when optimizations are disabled.
authorDavid Malcolm <dmalcolm@redhat.com>
Thu, 10 Oct 2013 18:11:41 +0000 (18:11 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Thu, 10 Oct 2013 18:11:41 +0000 (18:11 +0000)
2013-10-10  David Malcolm  <dmalcolm@redhat.com>

* ipa-inline.c (ipa_inline): Fix leak of "order" when
optimizations are disabled.

From-SVN: r203389

gcc/ChangeLog
gcc/ipa-inline.c

index 52e36d4bee896e833eadc767d5999d7b99afdca6..654946a565134d8194d72306abede8bb2ca7233f 100644 (file)
@@ -1,3 +1,8 @@
+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.
index 7735bb9da7bb71a14b414d6d7829b2c73540f2f2..4822c38ca58b95fb93e1f3ee5f0063acd7dcd155 100644 (file)
@@ -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 ();