diff options
author | Dominique Martinet <asmadeus@codewreck.org> | 2018-07-01 22:57:09 +0900 |
---|---|---|
committer | Dominique Martinet <asmadeus@codewreck.org> | 2018-07-02 08:03:41 +0900 |
commit | 0c6149171b3cbbf2b85a58743555db6fd866fa00 (patch) | |
tree | 4e2f90dc4894448c717767f0364ac379ed58cca3 | |
parent | cmd_background: fix leak on error (diff) | |
download | sway-0c6149171b3cbbf2b85a58743555db6fd866fa00.tar.gz sway-0c6149171b3cbbf2b85a58743555db6fd866fa00.tar.zst sway-0c6149171b3cbbf2b85a58743555db6fd866fa00.zip |
read_config: fix leak on error
Found through static analysis.
-rw-r--r-- | sway/config.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sway/config.c b/sway/config.c index 12a02163..d3040a67 100644 --- a/sway/config.c +++ b/sway/config.c | |||
@@ -583,6 +583,8 @@ bool read_config(FILE *file, struct sway_config *config) { | |||
583 | } | 583 | } |
584 | char *expanded = expand_line(block, line, brace_detected > 0); | 584 | char *expanded = expand_line(block, line, brace_detected > 0); |
585 | if (!expanded) { | 585 | if (!expanded) { |
586 | list_foreach(stack, free); | ||
587 | list_free(stack); | ||
586 | return false; | 588 | return false; |
587 | } | 589 | } |
588 | wlr_log(L_DEBUG, "Expanded line: %s", expanded); | 590 | wlr_log(L_DEBUG, "Expanded line: %s", expanded); |