diff options
author | Jeinzi <Jeinzi@gmx.de> | 2018-09-01 03:33:33 +0200 |
---|---|---|
committer | Jeinzi <Jeinzi@gmx.de> | 2018-09-01 03:33:33 +0200 |
commit | 3974eaebe657b989ce55a85fc24bc7fd09e67c00 (patch) | |
tree | 9c61933fd5aeb8c001d5c7cf759ba9049eea38ab /src/binds.c | |
parent | b5e646615e42a1f6991c7424c639faf2c4b49d52 (diff) | |
download | imv-3974eaebe657b989ce55a85fc24bc7fd09e67c00.tar.gz |
Fixed several memory leaks.
Diffstat (limited to 'src/binds.c')
-rw-r--r-- | src/binds.c | 3 |
1 files changed, 2 insertions, 1 deletions
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]; |