fix(search tree): fixed memory leak issue
This commit is contained in:
parent
4e57a165fd
commit
c8c2d5623d
1 changed files with 1 additions and 0 deletions
|
|
@ -114,6 +114,7 @@ FledastyError fledasty_binary_search_tree_##name##_insert(FledastyBinarySearchTr
|
||||||
while (new_node->parent == NULL) { \
|
while (new_node->parent == NULL) { \
|
||||||
if (compare_key_function(key, current_node->key)) { \
|
if (compare_key_function(key, current_node->key)) { \
|
||||||
current_node->value = value; \
|
current_node->value = value; \
|
||||||
|
hallocy_free(new_node); \
|
||||||
return FLEDASTY_ERROR_VALUE_REPLACED; \
|
return FLEDASTY_ERROR_VALUE_REPLACED; \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue