From be6053eb20c16405b239c07aed803ecbea0ea1a0 Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Thu, 26 Apr 2007 14:10:25 +0000 Subject: [PATCH] BugFix: get_next_neighbour(): free the nodeset allocated in the iterator when next steps outside: [r13475] --- ir/be/beifg_std.c | 3 +++ 1 file changed, 3 insertions(+) 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; } -- 2.20.1