aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2025-02-10 06:43:52 +0000
committerDaniel Eklöf <daniel@ekloef.se>2025-02-10 06:43:52 +0000
commit325086291b1e2c31322780377abb0759e9870489 (patch)
treee00b7232973db8526748017ab3275cc4c89e6759
parentMerge branch 'text-width-protocol' (diff)
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
-rw-r--r--config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/config.c b/config.c
index 604c0a76..7a12cb1a 100644
--- a/config.c
+++ b/config.c
@@ -1327,7 +1327,7 @@ parse_section_regex(struct context *ctx)
}
else if (streq(key, "launch")) {
- struct config_spawn_template launch;
+ struct config_spawn_template launch = {NULL};
if (!value_to_spawn_template(ctx, &launch))
return false;