From c8c2d5623dcf62d7a9ce613843da0473dda7f7bc Mon Sep 17 00:00:00 2001 From: Mineplay Date: Fri, 29 Aug 2025 13:26:07 -0500 Subject: [PATCH] fix(search tree): fixed memory leak issue --- Include/Fledasty/Trees/BinarySearchTree.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Include/Fledasty/Trees/BinarySearchTree.h b/Include/Fledasty/Trees/BinarySearchTree.h index 2bbf315..369a691 100644 --- a/Include/Fledasty/Trees/BinarySearchTree.h +++ b/Include/Fledasty/Trees/BinarySearchTree.h @@ -114,6 +114,7 @@ FledastyError fledasty_binary_search_tree_##name##_insert(FledastyBinarySearchTr while (new_node->parent == NULL) { \ if (compare_key_function(key, current_node->key)) { \ current_node->value = value; \ + hallocy_free(new_node); \ return FLEDASTY_ERROR_VALUE_REPLACED; \ } \ \