Haidong Yu : ws2_32: Add missing LeaveCriticalSection.

Alexandre Julliard julliard at winehq.org
Mon Sep 21 15:12:18 CDT 2020


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

Author: Haidong Yu <yuhaidong at uniontech.com>
Date:   Mon Sep 21 17:57:36 2020 +0800

ws2_32: Add missing LeaveCriticalSection.

Signed-off-by: Haidong Yu <yuhaidong at uniontech.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ws2_32/socket.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index 0ed1af3092..4162549d8b 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -494,7 +494,10 @@ static BOOL socket_list_add(SOCKET socket)
     }
     new_size = max(socket_list_size * 2, 8);
     if (!(new_array = heap_realloc(socket_list, new_size * sizeof(*socket_list))))
+    {
+        LeaveCriticalSection(&cs_socket_list);
         return FALSE;
+    }
     socket_list = new_array;
     memset(socket_list + socket_list_size, 0, (new_size - socket_list_size) * sizeof(*socket_list));
     socket_list[socket_list_size] = socket;




More information about the wine-cvs mailing list