mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-27 07:58:07 -04:00
config: don’t double-free key binding auxiliary data
Key bindings with multiple key mappings share auxiliary data (e.g. the command to execute in pipe-* bindings, or the escape sequence in text-bindings). The first one is the designated “master” copy. Only that one should be freed. This fixed a double-free on exit, with e.g. [text-bindings] \x1b\x23=Mod4+space Mod4+equal Closes #1259
This commit is contained in:
parent
ffaf08e07c
commit
09f3475ad1
2 changed files with 6 additions and 0 deletions
3
config.c
3
config.c
|
|
@ -1477,6 +1477,9 @@ parse_section_csd(struct context *ctx)
|
|||
static void
|
||||
free_binding_aux(struct binding_aux *aux)
|
||||
{
|
||||
if (!aux->master_copy)
|
||||
return;
|
||||
|
||||
switch (aux->type) {
|
||||
case BINDING_AUX_NONE: break;
|
||||
case BINDING_AUX_PIPE: free_argv(&aux->pipe); break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue