Remove unreachable code in mmapmodule error path on Windows (GH-143063)

mmapmodule: remove unreachable code in Windows error path

Remove an unreachable `return NULL` after `PyErr_SetFromWindowsErr()` in
the Windows mmap resize error path.

Signed-off-by: Yongtao Huang <yongtaoh2022@gmail.com>
This commit is contained in:
Yongtao Huang 2025-12-22 18:16:50 +08:00 committed by GitHub
parent 6213a512bf
commit 3960878143
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -963,7 +963,6 @@ mmap_mmap_resize_impl(mmap_object *self, Py_ssize_t new_size)
if (error) {
return PyErr_SetFromWindowsErr(error);
return NULL;
}
/* It's possible for a resize to fail, typically because another mapping
is still held against the same underlying file. Even if nothing has