[Python-checkins] gh-102336: Ensure CancelIoEx result is not ignored (GH-102347)

zooba webhook-mailer at python.org
Wed Mar 1 07:01:47 EST 2023


https://github.com/python/cpython/commit/d3d20743ee1ae7e0be17bacd278985cffa864816
commit: d3d20743ee1ae7e0be17bacd278985cffa864816
branch: main
author: Max Bachmann <kontakt at maxbachmann.de>
committer: zooba <steve.dower at microsoft.com>
date: 2023-03-01T12:01:39Z
summary:

gh-102336: Ensure CancelIoEx result is not ignored (GH-102347)

fix ignored return value

files:
M Modules/_winapi.c

diff --git a/Modules/_winapi.c b/Modules/_winapi.c
index 8c4c725b9df2..eefc2571ee82 100644
--- a/Modules/_winapi.c
+++ b/Modules/_winapi.c
@@ -288,7 +288,7 @@ _winapi_Overlapped_cancel_impl(OverlappedObject *self)
 
     if (self->pending) {
         Py_BEGIN_ALLOW_THREADS
-        CancelIoEx(self->handle, &self->overlapped);
+        res = CancelIoEx(self->handle, &self->overlapped);
         Py_END_ALLOW_THREADS
     }
 



More information about the Python-checkins mailing list