diff options
-rw-r--r-- | bitmapped_patricia_tree.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bitmapped_patricia_tree.c b/bitmapped_patricia_tree.c index 765b817..42985c5 100644 --- a/bitmapped_patricia_tree.c +++ b/bitmapped_patricia_tree.c @@ -249,7 +249,8 @@ bpt_t bpt_assoc(bpt_t bpt, bpt_key_t key, void *value) { memcpy(new_node->children, b->children, size_of_child_array); new_node->children[child_index] = new_child; // Retain the children copied into the new node. - bpt_for_children(bpt, bpt_retain); + bpt_for_children((bpt_t)new_node, bpt_retain); + bpt_release(new_child); return (bpt_t)new_node; } } |