mirror of
https://github.com/swaywm/sway.git
synced 2024-11-27 02:11:28 +00:00
sway/config: fix use-after-free for end of block
Introduced in 7c810dc344
This commit is contained in:
parent
df204b65d8
commit
71ab13f1eb
|
@ -626,13 +626,13 @@ bool read_config(FILE *file, struct sway_config *config) {
|
||||||
success = false;
|
success = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
wlr_log(L_DEBUG, "Exiting block '%s'", block);
|
|
||||||
list_del(stack, 0);
|
|
||||||
free(block);
|
|
||||||
|
|
||||||
if (strcmp(block, "bar") == 0) {
|
if (strcmp(block, "bar") == 0) {
|
||||||
config->current_bar = NULL;
|
config->current_bar = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wlr_log(L_DEBUG, "Exiting block '%s'", block);
|
||||||
|
list_del(stack, 0);
|
||||||
|
free(block);
|
||||||
memset(&config->handler_context, 0,
|
memset(&config->handler_context, 0,
|
||||||
sizeof(config->handler_context));
|
sizeof(config->handler_context));
|
||||||
default:;
|
default:;
|
||||||
|
|
Loading…
Reference in a new issue