rcxml.c: fix mem leak when deduplicating keybinds

Before this patch `keybind->keysyms` wasn't free'd when
- deduplicating keybinds
- removing keybinds due to empty action list

This patch creates a shared `keybind_destroy()` helper
which gets used in all cases where a keybind is destroyed.
This commit is contained in:
Consolatis 2024-11-15 22:58:44 +01:00 committed by Johan Malm
parent 07110d41ff
commit 6754801052
3 changed files with 14 additions and 4 deletions

View file

@ -30,6 +30,8 @@ struct keybind {
*/
struct keybind *keybind_create(const char *keybind);
void keybind_destroy(struct keybind *keybind);
/**
* parse_modifier - parse a string containing a single modifier name (e.g. "S")
* into the represented modifier value. returns 0 for invalid modifier names.