aboutsummaryrefslogtreecommitdiffstats
path: root/src/connection.c
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-12-06 11:22:23 -0600
committerDaniel Stone <daniels@collabora.com>2018-01-09 15:20:00 +0000
commit239ba39331420f953de35c337ae57db35573f9cb (patch)
tree3c8efe369f2a4aa7151b8fe2f22d206a9eeeff29 /src/connection.c
parentclient: Replace the singleton zombie with bespoke zombies (diff)
downloadwayland-239ba39331420f953de35c337ae57db35573f9cb.tar
wayland-239ba39331420f953de35c337ae57db35573f9cb.tar.gz
wayland-239ba39331420f953de35c337ae57db35573f9cb.tar.bz2
wayland-239ba39331420f953de35c337ae57db35573f9cb.tar.lz
wayland-239ba39331420f953de35c337ae57db35573f9cb.tar.xz
wayland-239ba39331420f953de35c337ae57db35573f9cb.tar.zst
wayland-239ba39331420f953de35c337ae57db35573f9cb.zip
client: Consume file descriptors destined for zombie proxies
We need to close file descriptors sent to zombie proxies to avoid leaking them, and perhaps more importantly, to prevent them from being dispatched in events on other objects (since they would previously be left in the buffer and potentially fed to following events destined for live proxies) Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
Diffstat (limited to 'src/connection.c')
-rw-r--r--src/connection.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/connection.c b/src/connection.c
index 426be57..6f83bab 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -192,6 +192,12 @@ close_fds(struct wl_buffer *buffer, int max)
buffer->tail += size;
}
+void
+wl_connection_close_fds_in(struct wl_connection *connection, int max)
+{
+ close_fds(&connection->fds_in, max);
+}
+
int
wl_connection_destroy(struct wl_connection *connection)
{