Zebediah Figura : server: Avoid touching the poll_req structure after calling async_request_complete() (Valgrind).
Alexandre Julliard
julliard at winehq.org
Wed Oct 13 15:59:25 CDT 2021
Module: wine
Branch: master
Commit: e6009c5b55200b614e328c4b38549bf8693e764b
URL: https://source.winehq.org/git/wine.git/?a=commit;h=e6009c5b55200b614e328c4b38549bf8693e764b
Author: Zebediah Figura <zfigura at codeweavers.com>
Date: Tue Oct 12 19:36:55 2021 -0500
server: Avoid touching the poll_req structure after calling async_request_complete() (Valgrind).
Fixes: 567beb6b2edba07051a75d45a9b2f1516568c0e7
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
server/sock.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/server/sock.c b/server/sock.c
index 03716cba90f..43a7c707740 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -838,6 +838,7 @@ static int get_poll_flags( struct sock *sock, int event )
static void complete_async_poll( struct poll_req *req, unsigned int status )
{
+ struct poll_socket_output *output = req->output;
unsigned int i;
for (i = 0; i < req->count; ++i)
@@ -849,8 +850,8 @@ static void complete_async_poll( struct poll_req *req, unsigned int status )
}
/* pass 0 as result; client will set actual result size */
- async_request_complete( req->async, status, 0, req->count * sizeof(*req->output), req->output );
req->output = NULL;
+ async_request_complete( req->async, status, 0, req->count * sizeof(*output), output );
}
static void complete_async_polls( struct sock *sock, int event, int error )
More information about the wine-cvs
mailing list