summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-05-26 12:25:13 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-05-26 12:25:13 (GMT)
commit13b21bd749aef0f6b18cec0e7e5d1d3e643f106a (patch)
tree354e3487d474d01ebd4a82e505ca52336a539eec /Python
parenta1a807b6efdbdaa0af7da4aff46a4a205d87e8f9 (diff)
downloadcpython-13b21bd749aef0f6b18cec0e7e5d1d3e643f106a.zip
cpython-13b21bd749aef0f6b18cec0e7e5d1d3e643f106a.tar.gz
cpython-13b21bd749aef0f6b18cec0e7e5d1d3e643f106a.tar.bz2
print_exception(): handle correctly PyObject_GetAttrString() failure
Bug found by the Clang Static Analyzer.
Diffstat (limited to 'Python')
-rw-r--r--Python/pythonrun.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index b55dc5b..232d7be 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -1593,7 +1593,7 @@ print_exception(PyObject *f, PyObject *value)
moduleName = PyObject_GetAttrString(type, "__module__");
if (moduleName == NULL || !PyUnicode_Check(moduleName))
{
- Py_DECREF(moduleName);
+ Py_XDECREF(moduleName);
err = PyFile_WriteString("<unknown>", f);
}
else {