diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2011-12-07 22:24:33 +0100 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2011-12-07 22:24:33 +0100 |
commit | d4b7b491099cc9633422dad6687a94392faeece1 (patch) | |
tree | b832a66ae4974f41dbd50b0e240708aa876d03a6 | |
parent | 5d2c1504bb0f88a5b823407ccfb5935069444577 (diff) |
Fix a memory leak.
-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; } } |