summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2018-03-06 17:38:13 -0600
committerDerek Foreman <derekf@osg.samsung.com>2018-03-07 09:21:28 -0600
commita9187853d44db41206b5d16a770d4db108972812 (patch)
tree11ea8b1fa43d48179636f5e4e1ef4882f699959f
parentconfigure.ac: bump to version 1.14.91 for the alpha release (diff)
downloadwayland-a9187853d44db41206b5d16a770d4db108972812.tar
wayland-a9187853d44db41206b5d16a770d4db108972812.tar.gz
wayland-a9187853d44db41206b5d16a770d4db108972812.tar.bz2
wayland-a9187853d44db41206b5d16a770d4db108972812.tar.lz
wayland-a9187853d44db41206b5d16a770d4db108972812.tar.xz
wayland-a9187853d44db41206b5d16a770d4db108972812.tar.zst
wayland-a9187853d44db41206b5d16a770d4db108972812.zip
client: Don't inappropriatly close fds for zombie objects
commit 239ba39331420f953de35c337ae57db35573f9cb which was intended to stop leaking fds in events for zombie objects didn't notice that passing 0 to wl_connection_close_fds_in() would still close fds. Test the fd count before calling. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
-rw-r--r--src/wayland-client.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wayland-client.c b/src/wayland-client.c
index c1369b8..1ffa1f0 100644
--- a/src/wayland-client.c
+++ b/src/wayland-client.c
@@ -1359,7 +1359,7 @@ queue_event(struct wl_display *display, int len)
if (!proxy || wl_object_is_zombie(&display->objects, id)) {
struct wl_zombie *zombie = wl_map_lookup(&display->objects, id);
- if (zombie)
+ if (zombie && zombie->fd_count[opcode]) {
wl_connection_close_fds_in(display->connection,
zombie->fd_count[opcode]);