ipc: fix cosmetic memory leak when shutting down
This commit is contained in:
parent
08976f7a2a
commit
287ebcc206
|
@ -71,6 +71,9 @@ void ipc_shutdown(void) {
|
||||||
current = TAILQ_FIRST(&all_clients);
|
current = TAILQ_FIRST(&all_clients);
|
||||||
shutdown(current->fd, SHUT_RDWR);
|
shutdown(current->fd, SHUT_RDWR);
|
||||||
close(current->fd);
|
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);
|
TAILQ_REMOVE(&all_clients, current, clients);
|
||||||
free(current);
|
free(current);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue