From 70be57352ce77a86eafb1270d6f6e4bbf19a40e9 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Thu, 11 Jun 2009 03:30:42 +0200 Subject: [PATCH] =?utf8?q?Fix=20memleak=20in=20config=20parsing=20(variabl?= =?utf8?q?es=20weren=E2=80=99t=20freed)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/config.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/config.c b/src/config.c index a9e90ab3..5d6312ed 100644 --- a/src/config.c +++ b/src/config.c @@ -279,6 +279,15 @@ void load_configuration(xcb_connection_t *conn, const char *override_configpath) REQUIRED_OPTION(terminal); REQUIRED_OPTION(font); + + + while (!SLIST_EMPTY(&variables)) { + struct Variable *v = SLIST_FIRST(&variables); + SLIST_REMOVE_HEAD(&variables, variables); + free(v->key); + free(v->value); + free(v); + } return; } -- 2.39.5