aboutsummaryrefslogtreecommitdiff
path: root/lib/algo/avl_tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/algo/avl_tree.c')
-rw-r--r--lib/algo/avl_tree.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/algo/avl_tree.c b/lib/algo/avl_tree.c
index d8f887c..cc06254 100644
--- a/lib/algo/avl_tree.c
+++ b/lib/algo/avl_tree.c
@@ -1,5 +1,4 @@
#include <lib/algo/avl_tree.h>
-#include <lib/mem/galloc.h>
#include <lib/monad.h>
#include <stddef.h>
@@ -56,7 +55,7 @@ AVLNode *left_rotate(AVLNode *parent) {
// Create AVL node
AVLNode *create_avl_node(void *data, AvlComparator compare) {
- AVLNode *node = (AVLNode *)g_malloc(sizeof(AVLNode));
+ AVLNode *node = (AVLNode *)malloc(sizeof(AVLNode));
if (node == NULL) {
return NULL;
}
@@ -135,7 +134,7 @@ void free_avl_tree(AVLNode *root) {
if (root != NULL) {
free_avl_tree(root->left);
free_avl_tree(root->right);
- g_free(root);
+ free(root);
}
}
@@ -145,8 +144,8 @@ void free_avl_tree_nodes(AVLNode *root) {
free_avl_tree_nodes(root->left);
free_avl_tree_nodes(root->right);
if (root->data != NULL) {
- g_free(root->data);
+ free(root->data);
}
- g_free(root);
+ free(root);
}
}