fix a memory leak in mainwindow about keys
This commit is contained in:
parent
6eff70d415
commit
08b69263d6
@ -400,7 +400,7 @@ void ncdc_mainwindow_input_ready(ncdc_mainwindow_t n)
|
|||||||
if (key != NULL &&
|
if (key != NULL &&
|
||||||
(k = ncdc_find_keybinding(keys_global, key, keylen)) != NULL) {
|
(k = ncdc_find_keybinding(keys_global, key, keylen)) != NULL) {
|
||||||
k->handler(n);
|
k->handler(n);
|
||||||
return;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (n->focus) {
|
switch (n->focus) {
|
||||||
@ -434,6 +434,8 @@ void ncdc_mainwindow_input_ready(ncdc_mainwindow_t n)
|
|||||||
} break;
|
} break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cleanup:
|
||||||
|
|
||||||
free(key);
|
free(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user