Zebediah Figura : server: Do not call sock_reselect() on an uninitialized socket.

Alexandre Julliard julliard at winehq.org
Mon May 10 15:44:05 CDT 2021


Module: wine
Branch: master
Commit: afad281dd1b4f5db226599980daf403c4db70937
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=afad281dd1b4f5db226599980daf403c4db70937

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Mon May 10 10:19:44 2021 -0500

server: Do not call sock_reselect() on an uninitialized socket.

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 server/sock.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/server/sock.c b/server/sock.c
index 24a826e4ce5..6891b5cbc57 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -838,8 +838,10 @@ static void sock_reselect_async( struct fd *fd, struct async_queue *queue )
 {
     struct sock *sock = get_fd_user( fd );
 
-    /* ignore reselect on ifchange queue */
-    if (&sock->ifchange_q != queue)
+    /* Don't reselect the ifchange queue; we always ask for POLLIN.
+     * Don't reselect an uninitialized socket; we can't call set_fd_events() on
+     * a pseudo-fd. */
+    if (queue != &sock->ifchange_q && sock->type)
         sock_reselect( sock );
 }
 




More information about the wine-cvs mailing list