summaryrefslogtreecommitdiff
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-05-26 14:25:13 +0200
committerVictor Stinner <victor.stinner@haypocalc.com>2011-05-26 14:25:13 +0200
commit48f7ac826a35230300859e8bfba3b7339efab679 (patch)
tree870f5dc1c5b672ba66a720d97a3c2a848b5ec8e3 /Python/pythonrun.c
parentf4cbb850ab23ff4b74c6c958b17fc4c723766b17 (diff)
downloadcpython-48f7ac826a35230300859e8bfba3b7339efab679.tar.gz
print_exception(): handle correctly PyObject_GetAttrString() failure
Bug found by the Clang Static Analyzer.
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r--Python/pythonrun.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index b55dc5b201..232d7befa0 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 {