From: Michael Stapelberg Date: Fri, 8 Jan 2016 20:24:12 +0000 (+0100) Subject: ipc: fix cosmetic memory leak when shutting down X-Git-Tag: 4.12~60 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=287ebcc206789747af4f8117e9ceb330b5a54959;p=i3%2Fi3 ipc: fix cosmetic memory leak when shutting down --- diff --git a/src/ipc.c b/src/ipc.c index 00b468fb..55eacb99 100644 --- a/src/ipc.c +++ b/src/ipc.c @@ -71,6 +71,9 @@ void ipc_shutdown(void) { current = TAILQ_FIRST(&all_clients); shutdown(current->fd, SHUT_RDWR); close(current->fd); + for (int i = 0; i < current->num_events; i++) + free(current->events[i]); + free(current->events); TAILQ_REMOVE(&all_clients, current, clients); free(current); }