From e5008ca0dc912e69b037f32a38e5272bd9d19585 Mon Sep 17 00:00:00 2001 From: Orestis Floros Date: Thu, 7 Sep 2017 04:19:57 +0300 Subject: [PATCH 1/2] Improve 267-regress-mark-restart.t Another window with a mark is needed for issue #2900. --- testcases/t/267-regress-mark-restart.t | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testcases/t/267-regress-mark-restart.t b/testcases/t/267-regress-mark-restart.t index 220d765b..302d23e5 100644 --- a/testcases/t/267-regress-mark-restart.t +++ b/testcases/t/267-regress-mark-restart.t @@ -20,6 +20,8 @@ use i3test; cmd 'open'; cmd 'mark foo'; +cmd 'open'; +cmd 'mark bar'; cmd 'restart'; From 554775f694d322024a90f15fc62fd243687fc45d Mon Sep 17 00:00:00 2001 From: Orestis Floros Date: Thu, 7 Sep 2017 03:53:28 +0300 Subject: [PATCH 2/2] Set marks to NULL after freeing realloc() was being called on an already freed pointer. Fixes #2900 --- src/load_layout.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/load_layout.c b/src/load_layout.c index 632c6ec7..7961e17f 100644 --- a/src/load_layout.c +++ b/src/load_layout.c @@ -157,6 +157,7 @@ static int json_end_map(void *ctx) { } free(marks); + marks = NULL; num_marks = 0; }