BugFix: get_next_neighbour(): free the nodeset allocated in the iterator when next...
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Thu, 26 Apr 2007 14:10:25 +0000 (14:10 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Thu, 26 Apr 2007 14:10:25 +0000 (14:10 +0000)
[r13475]

ir/be/beifg_std.c

index a9dd0cd..b0efa1c 100644 (file)
@@ -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;
 }