From: Michael Beck Date: Thu, 26 Apr 2007 14:10:25 +0000 (+0000) Subject: BugFix: get_next_neighbour(): free the nodeset allocated in the iterator when next... X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=be6053eb20c16405b239c07aed803ecbea0ea1a0;p=libfirm BugFix: get_next_neighbour(): free the nodeset allocated in the iterator when next steps outside: [r13475] --- diff --git a/ir/be/beifg_std.c b/ir/be/beifg_std.c index a9dd0cd04..b0efa1c88 100644 --- a/ir/be/beifg_std.c +++ b/ir/be/beifg_std.c @@ -183,6 +183,9 @@ static INLINE void neighbours_break(adj_iter_t *it, int force) static ir_node *get_next_neighbour(adj_iter_t *it) { ir_node *res = ir_nodeset_iterator_next(&it->iter); + if (res == NULL) { + ir_nodeset_destroy(&it->neighbours); + } return res; }