From 39608781437e3ab9b3be88bfdb99ac0e4ac78576 Mon Sep 17 00:00:00 2001 From: Yongtao Huang Date: Mon, 22 Dec 2025 18:16:50 +0800 Subject: [PATCH] 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 --- Modules/mmapmodule.c | 1 - 1 file changed, 1 deletion(-) diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c index ea20fb29c90..0928ea6a8b7 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