diff options
-rw-r--r-- | src/binds.c | 2 | ||||
-rw-r--r-- | src/imv.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/binds.c b/src/binds.c index 07416cf..e6aea45 100644 --- a/src/binds.c +++ b/src/binds.c @@ -86,7 +86,7 @@ enum bind_result imv_binds_add(struct imv_binds *binds, const struct list *keys, /* Create our new node */ next_node = malloc(sizeof *next_node); init_bind_node(next_node); - next_node->key = keys->items[i]; + next_node->key = strdup(keys->items[i]); list_append(node->suffixes, next_node); } else { next_node = node->suffixes->items[child_index]; @@ -286,7 +286,7 @@ static bool add_bind(struct imv *imv, const char *keys, const char *commands) commands = next_command; } - list_free(list); + list_deep_free(list); return success; } |