summaryrefslogtreecommitdiff
path: root/Lib/ctypes/util.py
diff options
context:
space:
mode:
authorMeador Inge <meadori@gmail.com>2016-04-30 21:56:59 -0500
committerMeador Inge <meadori@gmail.com>2016-04-30 21:56:59 -0500
commit383eb2c8efcd3963e2660384a9a57f4ba1e051b3 (patch)
tree9cc8a4c04426d3f3cfd73893e73cd1fae57f5b87 /Lib/ctypes/util.py
parent2a2f97b59fc39bd426e268dc4aa5eb943fe24331 (diff)
downloadcpython-383eb2c8efcd3963e2660384a9a57f4ba1e051b3.tar.gz
Issue #24114: Fix an uninitialized variable in `ctypes.util`.
The bug only occurs on SunOS when the ctypes implementation searches for the `crle` program. Patch by Xiang Zhang. Tested on SunOS by Kees Bos.
Diffstat (limited to 'Lib/ctypes/util.py')
-rw-r--r--Lib/ctypes/util.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py
index 9e74ccdbcf..8ff4aff0ca 100644
--- a/Lib/ctypes/util.py
+++ b/Lib/ctypes/util.py
@@ -184,6 +184,7 @@ elif os.name == "posix":
else:
cmd = 'env LC_ALL=C /usr/bin/crle 2>/dev/null'
+ paths = None
with contextlib.closing(os.popen(cmd)) as f:
for line in f.readlines():
line = line.strip()