commit 0c6149171b3cbbf2b85a58743555db6fd866fa00
parent a2354d599254941da46e3e17b929c1a40e816cc4
Author: Dominique Martinet <asmadeus@codewreck.org>
Date: Sun, 1 Jul 2018 22:57:09 +0900
read_config: fix leak on error
Found through static analysis.
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/sway/config.c b/sway/config.c
@@ -583,6 +583,8 @@ bool read_config(FILE *file, struct sway_config *config) {
}
char *expanded = expand_line(block, line, brace_detected > 0);
if (!expanded) {
+ list_foreach(stack, free);
+ list_free(stack);
return false;
}
wlr_log(L_DEBUG, "Expanded line: %s", expanded);