From 8d4bf6c57723b46179a3b202cfc1660e8f864405 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sat, 9 Jan 2016 14:19:00 +0100 Subject: [PATCH] free dynamically allocated matches --- src/load_layout.c | 1 + src/manage.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/load_layout.c b/src/load_layout.c index 33435236..173e573b 100644 --- a/src/load_layout.c +++ b/src/load_layout.c @@ -87,6 +87,7 @@ static int json_end_map(void *ctx) { Match *match = TAILQ_FIRST(&(json_node->swallow_head)); TAILQ_REMOVE(&(json_node->swallow_head), match, matches); match_free(match); + free(match); } } diff --git a/src/manage.c b/src/manage.c index 05ac15f0..d6a8c6d3 100644 --- a/src/manage.c +++ b/src/manage.c @@ -304,6 +304,7 @@ void manage_window(xcb_window_t window, xcb_get_window_attributes_cookie_t cooki Match *first = TAILQ_FIRST(&(nc->swallow_head)); TAILQ_REMOVE(&(nc->swallow_head), first, matches); match_free(first); + free(first); } } } -- 2.39.5