From 08b69263d60d14d837cae4271afd981de01b09fe Mon Sep 17 00:00:00 2001 From: Florian Stinglmayr Date: Sat, 20 Jul 2019 13:49:28 +0200 Subject: [PATCH] fix a memory leak in mainwindow about keys --- ncdc/src/mainwindow.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ncdc/src/mainwindow.c b/ncdc/src/mainwindow.c index 778a845..a00acd5 100644 --- a/ncdc/src/mainwindow.c +++ b/ncdc/src/mainwindow.c @@ -400,7 +400,7 @@ void ncdc_mainwindow_input_ready(ncdc_mainwindow_t n) if (key != NULL && (k = ncdc_find_keybinding(keys_global, key, keylen)) != NULL) { k->handler(n); - return; + goto cleanup; } switch (n->focus) { @@ -434,6 +434,8 @@ void ncdc_mainwindow_input_ready(ncdc_mainwindow_t n) } break; } +cleanup: + free(key); }