Commit a9187853 authored by Derek Foreman's avatar Derek Foreman

client: Don't inappropriatly close fds for zombie objects

commit 239ba393 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: default avatarDerek Foreman <derekf@osg.samsung.com>
Reviewed-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
parent 97351f99
......@@ -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]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment