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

index 55eacb99f3699f3007e71317f29e48b41daa15f1..f46e71797b5262d41681162c7d270065d40b037f 100644 (file)
--- a/src/ipc.c
+++ b/src/ipc.c
@@ -1082,6 +1082,7 @@ static void ipc_receive_message(EV_P_ struct ev_io *w, int revents) {
 
             for (int i = 0; i < current->num_events; i++)
                 free(current->events[i]);
+            free(current->events);
             /* We can call TAILQ_REMOVE because we break out of the
              * TAILQ_FOREACH afterwards */
             TAILQ_REMOVE(&all_clients, current, clients);