From 287ebcc206789747af4f8117e9ceb330b5a54959 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Fri, 8 Jan 2016 21:24:12 +0100 Subject: [PATCH] ipc: fix cosmetic memory leak when shutting down --- src/ipc.c | 3 +++ 1 file changed, 3 insertions(+) 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); } -- 2.39.5