diff options
author | Steve Dower <steve.dower@microsoft.com> | 2016-09-09 16:03:15 (GMT) |
---|---|---|
committer | Steve Dower <steve.dower@microsoft.com> | 2016-09-09 16:03:15 (GMT) |
commit | 6230aaf56145f9ed67b6fbc572d9a3d3ae500e38 (patch) | |
tree | 6527075c4ae8b314f6b23f4b6cd505c9e5f468f0 /Modules | |
parent | 18591e418915aad9811dc1c7a064ca244fcc7f68 (diff) | |
download | cpython-6230aaf56145f9ed67b6fbc572d9a3d3ae500e38.zip cpython-6230aaf56145f9ed67b6fbc572d9a3d3ae500e38.tar.gz cpython-6230aaf56145f9ed67b6fbc572d9a3d3ae500e38.tar.bz2 |
Issue #27781: Fixes uninitialized fd when !MS_WINDOWS and !HAVE_OPENAT
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/posixmodule.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index c1ba7ba..ce64684 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -7477,13 +7477,14 @@ os_open_impl(PyObject *module, path_t *path, int flags, int mode, int dir_fd) Py_BEGIN_ALLOW_THREADS #ifdef MS_WINDOWS fd = _wopen(path->wide, flags, mode); -#endif +#else #ifdef HAVE_OPENAT if (dir_fd != DEFAULT_DIR_FD) fd = openat(dir_fd, path->narrow, flags, mode); else +#endif /* HAVE_OPENAT */ fd = open(path->narrow, flags, mode); -#endif +#endif /* !MS_WINDOWS */ Py_END_ALLOW_THREADS } while (fd < 0 && errno == EINTR && !(async_err = PyErr_CheckSignals())); _Py_END_SUPPRESS_IPH |