From 393e1909b78ffee53d1397237423e1d975edc507 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sun, 22 Sep 2019 00:44:51 +0200 Subject: [PATCH] module/i3: plug valgrind detected memory leak Free previous 'application' string before replacing it with a new one. --- modules/i3.c | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/i3.c b/modules/i3.c index 8f2420b..df642b9 100644 --- a/modules/i3.c +++ b/modules/i3.c @@ -395,6 +395,7 @@ handle_window_event(int type, const struct json_object *json, void *_mod) assert(bytes >= 0); application[bytes - 1] = '\0'; + free(ws->window.application); ws->window.application = strdup(application); close(fd); }