summaryrefslogtreecommitdiffstats
path: root/sway
diff options
context:
space:
mode:
authorLibravatar Dominique Martinet <asmadeus@codewreck.org>2018-06-03 00:31:45 +0900
committerLibravatar Dominique Martinet <asmadeus@codewreck.org>2018-06-03 00:31:51 +0900
commit71ab13f1ebfa7c0d4828873f6f43a14cafa6af0e (patch)
treee666502f59f8224794663a23d503f0c6d4560f97 /sway
parentMerge pull request #2089 from emersion/send-frame-done-visible (diff)
downloadsway-71ab13f1ebfa7c0d4828873f6f43a14cafa6af0e.tar.gz
sway-71ab13f1ebfa7c0d4828873f6f43a14cafa6af0e.tar.zst
sway-71ab13f1ebfa7c0d4828873f6f43a14cafa6af0e.zip
sway/config: fix use-after-free for end of block
Diffstat (limited to 'sway')
-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) {
626 success = false; 626 success = false;
627 break; 627 break;
628 } 628 }
629 wlr_log(L_DEBUG, "Exiting block '%s'", block);
630 list_del(stack, 0);
631 free(block);
632
633 if (strcmp(block, "bar") == 0) { 629 if (strcmp(block, "bar") == 0) {
634 config->current_bar = NULL; 630 config->current_bar = NULL;
635 } 631 }
632
633 wlr_log(L_DEBUG, "Exiting block '%s'", block);
634 list_del(stack, 0);
635 free(block);
636 memset(&config->handler_context, 0, 636 memset(&config->handler_context, 0,
637 sizeof(config->handler_context)); 637 sizeof(config->handler_context));
638 default:; 638 default:;