diff options
author | Stéphane Wirtel <stephane@wirtel.be> | 2018-01-30 06:04:36 (GMT) |
---|---|---|
committer | Gregory P. Smith <greg@krypto.org> | 2018-01-30 06:04:36 (GMT) |
commit | 3d86e484de6334fe16cbab512744597bd0de4e80 (patch) | |
tree | 36f3fbe909d391dddf39556c965cd57097771300 /Modules/posixmodule.c | |
parent | ce237c7d58ba207575cdfb0195a58a6407fbf717 (diff) | |
download | cpython-3d86e484de6334fe16cbab512744597bd0de4e80.zip cpython-3d86e484de6334fe16cbab512744597bd0de4e80.tar.gz cpython-3d86e484de6334fe16cbab512744597bd0de4e80.tar.bz2 |
bpo-32681: Fix an uninitialized variable in the C implementation of os.dup2 (GH-5346)
See https://bugs.python.org/issue32441 for where this was introduced.
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r-- | Modules/posixmodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 46f3ada..4a1c9f3 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -8012,7 +8012,7 @@ static int os_dup2_impl(PyObject *module, int fd, int fd2, int inheritable) /*[clinic end generated code: output=bc059d34a73404d1 input=c3cddda8922b038d]*/ { - int res; + int res = 0; #if defined(HAVE_DUP3) && \ !(defined(HAVE_FCNTL_H) && defined(F_DUP2FD_CLOEXEC)) /* dup3() is available on Linux 2.6.27+ and glibc 2.9 */ |