From 9f91feb5d9c56d7047dbeac4e1612190ca77ab4d Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Thu, 22 Mar 2012 14:24:18 +0200 Subject: server: do not create wl_client if accept() failed Spotted during wl_os_accept_cloexec() work. Signed-off-by: Pekka Paalanen --- src/wayland-server.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wayland-server.c b/src/wayland-server.c index e8173fb..97d8918 100644 --- a/src/wayland-server.c +++ b/src/wayland-server.c @@ -906,8 +906,8 @@ socket_data(int fd, uint32_t mask, void *data) &length); if (client_fd < 0) fprintf(stderr, "failed to accept, errno: %d\n", errno); - - wl_client_create(display, client_fd); + else + wl_client_create(display, client_fd); return 1; } -- cgit v1.2.3