Fix memory leak introduced in r238336

* tree-ssa-loop-niter.c (loop_only_exit_p): Release body array.

From-SVN: r238705
This commit is contained in:
Martin Liska 2016-07-25 12:52:30 +02:00 committed by Martin Liska
parent 16b0596564
commit ccae0c8546
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2016-07-25 Martin Liska <mliska@suse.cz>
* tree-ssa-loop-niter.c (loop_only_exit_p): Release body array.
2016-07-25 Martin Liska <mliska@suse.cz>
PR tree-optimization/71987

View File

@ -2119,7 +2119,10 @@ loop_only_exit_p (const struct loop *loop, const_edge exit)
{
for (bsi = gsi_start_bb (body[i]); !gsi_end_p (bsi); gsi_next (&bsi))
if (stmt_can_terminate_bb_p (gsi_stmt (bsi)))
return true;
{
free (body);
return true;
}
}
free (body);