diff --git a/src/connection.c b/src/connection.c index 7fba999b..d0c7d9fc 100644 --- a/src/connection.c +++ b/src/connection.c @@ -644,8 +644,12 @@ wl_closure_marshal(struct wl_object *sender, uint32_t opcode, case 'h': fd = args[i].h; dup_fd = wl_os_dupfd_cloexec(fd, 0); - if (dup_fd < 0) - wl_abort("dup failed: %s\n", strerror(errno)); + if (dup_fd < 0) { + wl_closure_destroy(closure); + wl_log("error marshalling arguments for %s: dup failed: %s\n", + message->name, strerror(errno)); + return NULL; + } closure->args[i].h = dup_fd; break; default: