aboutsummaryrefslogtreecommitdiffstats
path: root/src/connection.c
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@googlemail.com>2012-10-11 23:37:47 +0200
committerKristian Høgsberg <krh@bitplanet.net>2012-10-15 16:16:24 -0400
commit5bae0650baa400273720d7f5953536f99969d6ef (patch)
treed7b86f1e3f64848e3058088d07107a23c0724f40 /src/connection.c
parentconnection: fix buffer-overflow in close_fds() (diff)
downloadwayland-5bae0650baa400273720d7f5953536f99969d6ef.tar
wayland-5bae0650baa400273720d7f5953536f99969d6ef.tar.gz
wayland-5bae0650baa400273720d7f5953536f99969d6ef.tar.bz2
wayland-5bae0650baa400273720d7f5953536f99969d6ef.tar.lz
wayland-5bae0650baa400273720d7f5953536f99969d6ef.tar.xz
wayland-5bae0650baa400273720d7f5953536f99969d6ef.tar.zst
wayland-5bae0650baa400273720d7f5953536f99969d6ef.zip
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>
Diffstat (limited to 'src/connection.c')
-rw-r--r--src/connection.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/connection.c b/src/connection.c
index 7cf645c..7c8a191 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -190,6 +190,7 @@ void
wl_connection_destroy(struct wl_connection *connection)
{
close_fds(&connection->fds_out, -1);
+ close_fds(&connection->fds_in, -1);
close(connection->fd);
free(connection);
}