Patchwork [SMS] Add missing free operation in mark_loop_unsched

login
register
mail settings
Submitter Revital Eres
Date Dec. 12, 2011, 6:20 a.m.
Message ID <CAHz1=dVvfY3QA2=ih_=VJ4GUdpmKWvOQb1GAraL1KdkDrETWrg@mail.gmail.com>
Download mbox | patch
Permalink /patch/130639/
State New
Headers show

Comments

Revital Eres - Dec. 12, 2011, 6:20 a.m.
Hello,

The patch below adds a missing free operation in mark_loop_unsched.

Tested (bootstrap and regtest) ppc64-redhat-linux.

OK for 3.7?

Thanks,
Revital


Changelog:

        * modulo-sched.c (mark_loop_unsched): Free bbs.
Revital Eres - Dec. 12, 2011, 6:25 a.m.
Hello,

> OK for 3.7?

Sorry, I meant GCC 4.7.0...

Thanks,
Revital
Ayal Zaks - Dec. 12, 2011, 9:26 p.m.
sure, OK, thanks for catching this leak.
Ayal.


On Mon, Dec 12, 2011 at 8:25 AM, Revital Eres <revital.eres@linaro.org> wrote:
> Hello,
>
>> OK for 3.7?
>
> Sorry, I meant GCC 4.7.0...
>
> Thanks,
> Revital

Patch

Index: modulo-sched.c
===================================================================
--- modulo-sched.c      (revision 182198)
+++ modulo-sched.c      (working copy)
@@ -1204,6 +1204,8 @@  mark_loop_unsched (struct loop *loop)

   for (i = 0; i < loop->num_nodes; i++)
     bbs[i]->flags |= BB_DISABLE_SCHEDULE;
+
+  free (bbs);
 }

 /* Return true if all the BBs of the loop are empty except the