diff options
author | Dominique Martinet <asmadeus@codewreck.org> | 2018-06-03 00:31:45 +0900 |
---|---|---|
committer | Dominique Martinet <asmadeus@codewreck.org> | 2018-06-03 00:31:51 +0900 |
commit | 71ab13f1ebfa7c0d4828873f6f43a14cafa6af0e (patch) | |
tree | e666502f59f8224794663a23d503f0c6d4560f97 | |
parent | Merge pull request #2089 from emersion/send-frame-done-visible (diff) | |
download | sway-71ab13f1ebfa7c0d4828873f6f43a14cafa6af0e.tar.gz sway-71ab13f1ebfa7c0d4828873f6f43a14cafa6af0e.tar.zst sway-71ab13f1ebfa7c0d4828873f6f43a14cafa6af0e.zip |
sway/config: fix use-after-free for end of block
Introduced in 7c810dc344c28d1876c5ee158cb0806289d0f813
-rw-r--r-- | sway/config.c | 8 |
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:; |