[PATCH 1/3] server: Do not allocate a connect_req structure for nonblocking sockets (Valgrind).
Zebediah Figura
zfigura at codeweavers.com
Thu Oct 7 23:01:12 CDT 2021
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
---
server/sock.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/server/sock.c b/server/sock.c
index 396447a0aa4..9cc634d3771 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -2290,9 +2290,6 @@ static void sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
if (!send_len) return;
}
- if (!(req = mem_alloc( sizeof(*req) )))
- return;
-
sock->state = SOCK_CONNECTING;
if (params->synchronous && sock->nonblocking)
@@ -2302,6 +2299,9 @@ static void sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
return;
}
+ if (!(req = mem_alloc( sizeof(*req) )))
+ return;
+
req->async = (struct async *)grab_object( async );
req->iosb = async_get_iosb( async );
req->sock = (struct sock *)grab_object( sock );
--
2.33.0
More information about the wine-devel
mailing list