diff options
Diffstat (limited to 'lib/assoc_array.c')
-rw-r--r-- | lib/assoc_array.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/assoc_array.c b/lib/assoc_array.c index c0b1007011e1..2404d03e251a 100644 --- a/lib/assoc_array.c +++ b/lib/assoc_array.c | |||
@@ -1723,11 +1723,13 @@ ascend_old_tree: | |||
1723 | shortcut = assoc_array_ptr_to_shortcut(ptr); | 1723 | shortcut = assoc_array_ptr_to_shortcut(ptr); |
1724 | slot = shortcut->parent_slot; | 1724 | slot = shortcut->parent_slot; |
1725 | cursor = shortcut->back_pointer; | 1725 | cursor = shortcut->back_pointer; |
1726 | if (!cursor) | ||
1727 | goto gc_complete; | ||
1726 | } else { | 1728 | } else { |
1727 | slot = node->parent_slot; | 1729 | slot = node->parent_slot; |
1728 | cursor = ptr; | 1730 | cursor = ptr; |
1729 | } | 1731 | } |
1730 | BUG_ON(!ptr); | 1732 | BUG_ON(!cursor); |
1731 | node = assoc_array_ptr_to_node(cursor); | 1733 | node = assoc_array_ptr_to_node(cursor); |
1732 | slot++; | 1734 | slot++; |
1733 | goto continue_node; | 1735 | goto continue_node; |
@@ -1735,7 +1737,7 @@ ascend_old_tree: | |||
1735 | gc_complete: | 1737 | gc_complete: |
1736 | edit->set[0].to = new_root; | 1738 | edit->set[0].to = new_root; |
1737 | assoc_array_apply_edit(edit); | 1739 | assoc_array_apply_edit(edit); |
1738 | edit->array->nr_leaves_on_tree = nr_leaves_on_tree; | 1740 | array->nr_leaves_on_tree = nr_leaves_on_tree; |
1739 | return 0; | 1741 | return 0; |
1740 | 1742 | ||
1741 | enomem: | 1743 | enomem: |