tree2scop.c: scop_from_tree_macro: drop redundant argument and plug leak
commit619b7670af260d9d211afdd65b333784cdf1e479
authorSven Verdoolaege <skimo@kotnet.org>
Wed, 23 Sep 2015 13:42:14 +0000 (23 15:42 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Wed, 23 Sep 2015 13:42:14 +0000 (23 15:42 +0200)
treec91fcd7d5baef8f66336e63f5b48df0ccee152c3
parente55edb9a09c9f612eb7b844d0f9c1d90c8af3f87
tree2scop.c: scop_from_tree_macro: drop redundant argument and plug leak

The redundant argument has been there from the start in 892c4f3
(add encapsulate_dynamic_control option, Tue Jan 28 11:16:24 2014 +0100).
Usually, the argument is NULL, so it does not have any effect,
but if the "macro-statement" has a label, then a copy would be passed
that is never freed, resulting in a memory leak.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
tests/encapsulate/while2.c [new file with mode: 0644]
tests/encapsulate/while2.scop [new file with mode: 0644]
tree2scop.c