ipc: fix cosmetic memory leak when shutting down

This commit is contained in:
Michael Stapelberg 2016-01-08 21:24:12 +01:00
parent 08976f7a2a
commit 287ebcc206

View File

@ -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);
}