From 3974eaebe657b989ce55a85fc24bc7fd09e67c00 Mon Sep 17 00:00:00 2001 From: Jeinzi Date: Sat, 1 Sep 2018 03:33:33 +0200 Subject: Fixed several memory leaks. --- src/binds.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/binds.c') diff --git a/src/binds.c b/src/binds.c index a710278..9e268b4 100644 --- a/src/binds.c +++ b/src/binds.c @@ -51,6 +51,7 @@ struct imv_binds *imv_binds_create(void) void imv_binds_free(struct imv_binds *binds) { destroy_bind_node(&binds->bind_tree); + list_deep_free(binds->keys); free(binds); } @@ -83,7 +84,7 @@ enum bind_result imv_binds_add(struct imv_binds *binds, const struct list *keys, /* Create our new node */ next_node = malloc(sizeof(struct bind_node)); init_bind_node(next_node); - next_node->key = strdup(keys->items[i]); + next_node->key = keys->items[i]; list_append(node->suffixes, next_node); } else { next_node = node->suffixes->items[child_index]; -- cgit v1.2.3