aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/hotkey.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/hotkey.c b/src/hotkey.c
index f1d2ab6..7b3008a 100644
--- a/src/hotkey.c
+++ b/src/hotkey.c
@@ -193,8 +193,15 @@ void free_mode_map(struct table *mode_map)
buf_push(freed_pointers, hotkey);
buf_free(hotkey->mode_list);
- buf_free(hotkey->process_name);
- buf_free(hotkey->command);
+
+ for (int i = 0; i < buf_len(hotkey->process_name); ++i) {
+ free(hotkey->process_name[i]);
+ }
+
+ for (int i = 0; i < buf_len(hotkey->command); ++i) {
+ free(hotkey->command[i]);
+ }
+
free(hotkey);
next:;
}