mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-07 08:21:02 -04:00
config: regex: fix invalid free
Zero-initialize the 'launch' spawn template before calling value_to_spawn_template(). This is needed since value_to_spawn_template() tries to free the old value before assigning the new one. Closes #1951
This commit is contained in:
parent
d84b0d4c6a
commit
325086291b
1 changed files with 1 additions and 1 deletions
2
config.c
2
config.c
|
|
@ -1327,7 +1327,7 @@ parse_section_regex(struct context *ctx)
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (streq(key, "launch")) {
|
else if (streq(key, "launch")) {
|
||||||
struct config_spawn_template launch;
|
struct config_spawn_template launch = {NULL};
|
||||||
if (!value_to_spawn_template(ctx, &launch))
|
if (!value_to_spawn_template(ctx, &launch))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue