From: Michael Stapelberg Date: Fri, 8 Jan 2016 20:24:21 +0000 (+0100) Subject: ipc: fix memory leak when clients with subscriptions disconnect X-Git-Tag: 4.12~59 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=de035cab6d0e50cb77448d730c14647668e3a575;p=i3%2Fi3 ipc: fix memory leak when clients with subscriptions disconnect --- diff --git a/src/ipc.c b/src/ipc.c index 55eacb99..f46e7179 100644 --- 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);