summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2012-08-22 15:45:52 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2012-08-22 15:45:52 (GMT)
commitad54c6d82e9a4e3feb2a4a48a291dda99cf55507 (patch)
tree1090169ab05c402096216488d8290c4fba9626a2 /Python
parent9bd9cd3fb996e580733d452d61aa59af01a84d93 (diff)
downloadcpython-ad54c6d82e9a4e3feb2a4a48a291dda99cf55507.zip
cpython-ad54c6d82e9a4e3feb2a4a48a291dda99cf55507.tar.gz
cpython-ad54c6d82e9a4e3feb2a4a48a291dda99cf55507.tar.bz2
Issue #15766: Fix a crash in imp.load_dynamic() on PyUnicode_FromString() failure
Diffstat (limited to 'Python')
-rw-r--r--Python/dynload_shlib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/dynload_shlib.c b/Python/dynload_shlib.c
index 24e4ede..0ca65c7 100644
--- a/Python/dynload_shlib.c
+++ b/Python/dynload_shlib.c
@@ -139,9 +139,9 @@ dl_funcptr _PyImport_GetDynLoadFunc(const char *shortname,
path = PyUnicode_FromString(pathname);
mod_name = PyUnicode_FromString(shortname);
PyErr_SetImportError(error_ob, mod_name, path);
- Py_DECREF(error_ob);
- Py_DECREF(path);
- Py_DECREF(mod_name);
+ Py_XDECREF(error_ob);
+ Py_XDECREF(path);
+ Py_XDECREF(mod_name);
return NULL;
}
if (fp != NULL && nhandles < 128)