]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-39184: Fix incorrect return value (GH-18580)
authorSteve Dower <steve.dower@python.org>
Thu, 20 Feb 2020 22:24:44 +0000 (22:24 +0000)
committerGitHub <noreply@github.com>
Thu, 20 Feb 2020 22:24:43 +0000 (14:24 -0800)
https://bugs.python.org/issue39184

Automerge-Triggered-By: @zooba
PC/msvcrtmodule.c

index 5c06ec2621ea6c6fa0d455d4a6634929a0a1b951..faceb03fba39d1aa9808ed819a73c989eff49cc5 100644 (file)
@@ -180,7 +180,7 @@ msvcrt_open_osfhandle_impl(PyObject *module, void *handle, int flags)
     int fd;
 
     if (PySys_Audit("msvcrt.open_osfhandle", "Ki", handle, flags) < 0) {
-        return NULL;
+        return -1;
     }
 
     _Py_BEGIN_SUPPRESS_IPH