connection: close pending incoming FDs on shutdown

Same problem as with outgoing FDs. We need to close these on shutdown,
otherwise we leak open file descriptors.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
David Herrmann 2012-10-11 23:37:47 +02:00 committed by Kristian Høgsberg
parent 9bd41ed6a9
commit 5bae0650ba

View file

@ -190,6 +190,7 @@ void
wl_connection_destroy(struct wl_connection *connection) wl_connection_destroy(struct wl_connection *connection)
{ {
close_fds(&connection->fds_out, -1); close_fds(&connection->fds_out, -1);
close_fds(&connection->fds_in, -1);
close(connection->fd); close(connection->fd);
free(connection); free(connection);
} }