From: Yongtao Huang Date: Mon, 22 Dec 2025 10:16:50 +0000 (+0800) Subject: Remove unreachable code in mmapmodule error path on Windows (GH-143063) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39608781437e3ab9b3be88bfdb99ac0e4ac78576;p=thirdparty%2FPython%2Fcpython.git 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 --- diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c index ea20fb29c902..0928ea6a8b70 100644 --- a/Modules/mmapmodule.c +++ b/Modules/mmapmodule.c @@ -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