From 325086291b1e2c31322780377abb0759e9870489 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Mon, 10 Feb 2025 07:43:52 +0100 Subject: [PATCH] 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 --- config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;