]> git.sur5r.net Git - i3/i3/commitdiff
ipc: fix cosmetic memory leak when shutting down
authorMichael Stapelberg <michael@stapelberg.de>
Fri, 8 Jan 2016 20:24:12 +0000 (21:24 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Fri, 8 Jan 2016 20:24:12 +0000 (21:24 +0100)
src/ipc.c

index 00b468fbbdf18cc671dcd6f5147e79d51df86c72..55eacb99f3699f3007e71317f29e48b41daa15f1 100644 (file)
--- 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);
     }