aboutsummaryrefslogtreecommitdiff
path: root/sway/config.c
diff options
context:
space:
mode:
authorDominique Martinet <asmadeus@codewreck.org>2018-06-03 00:31:45 +0900
committerDominique Martinet <asmadeus@codewreck.org>2018-06-03 00:31:51 +0900
commit71ab13f1ebfa7c0d4828873f6f43a14cafa6af0e (patch)
treee666502f59f8224794663a23d503f0c6d4560f97 /sway/config.c
parentdf204b65d84ba0a1d005922f0a9a616e1757d3b1 (diff)
sway/config: fix use-after-free for end of block
Introduced in 7c810dc344c28d1876c5ee158cb0806289d0f813
Diffstat (limited to 'sway/config.c')
-rw-r--r--sway/config.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sway/config.c b/sway/config.c
index 88cc6843..445c3d55 100644
--- a/sway/config.c
+++ b/sway/config.c
@@ -626,13 +626,13 @@ bool read_config(FILE *file, struct sway_config *config) {
success = false;
break;
}
- wlr_log(L_DEBUG, "Exiting block '%s'", block);
- list_del(stack, 0);
- free(block);
-
if (strcmp(block, "bar") == 0) {
config->current_bar = NULL;
}
+
+ wlr_log(L_DEBUG, "Exiting block '%s'", block);
+ list_del(stack, 0);
+ free(block);
memset(&config->handler_context, 0,
sizeof(config->handler_context));
default:;