[PATCH v2 1/5] server: Avoid calling get_unix_fd() in IOCTL_AFD_CREATE.

Zebediah Figura z.figura12 at gmail.com
Mon May 10 10:19:43 CDT 2021


Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
 server/sock.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/server/sock.c b/server/sock.c
index 36fda31f9c1..24a826e4ce5 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -1087,7 +1087,6 @@ static int init_socket( struct sock *sock, int family, int type, int protocol, u
         return -1;
     }
     sock_reselect( sock );
-    clear_error();
     return 0;
 }
 
@@ -1354,7 +1353,7 @@ static int sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
 
     assert( sock->obj.ops == &sock_ops );
 
-    if (get_unix_fd( fd ) == -1 && code != IOCTL_AFD_CREATE) return 0;
+    if (code != IOCTL_AFD_CREATE && get_unix_fd( fd ) < 0) return 0;
 
     switch(code)
     {
-- 
2.30.2




More information about the wine-devel mailing list