aboutsummaryrefslogtreecommitdiff
path: root/src/util/container_heap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/container_heap.c')
-rw-r--r--src/util/container_heap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/util/container_heap.c b/src/util/container_heap.c
index b9cab1e..e2a2700 100644
--- a/src/util/container_heap.c
+++ b/src/util/container_heap.c
@@ -400,6 +400,8 @@ GNUNET_CONTAINER_heap_remove_root (struct GNUNET_CONTAINER_Heap *heap)
heap->root = root->left_child;
insert_node (heap, heap->root, root->right_child);
}
+ if (heap->walk_pos == root)
+ heap->walk_pos = heap->root;
GNUNET_free (root);
#if EXTRA_CHECKS
GNUNET_assert (((heap->size == 0) && (heap->root == NULL)) ||