diff options
author | Brian Curtin <brian@python.org> | 2012-04-17 16:57:09 -0500 |
---|---|---|
committer | Brian Curtin <brian@python.org> | 2012-04-17 16:57:09 -0500 |
commit | 5d8520121e1ea38bcfe37258449a946ee328cac1 (patch) | |
tree | 4cdf797354f42b885f54f693e3ed397821842220 /Python/dynload_win.c | |
parent | 5e1e248e4f7b23cd3fccc1981b448e0d5d7a3b49 (diff) | |
download | cpython-5d8520121e1ea38bcfe37258449a946ee328cac1.tar.gz |
Fix #14600. Correct reference handling and naming of ImportError convenience function
Diffstat (limited to 'Python/dynload_win.c')
-rw-r--r-- | Python/dynload_win.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/dynload_win.c b/Python/dynload_win.c index ef3e2c5958..7bf3dfc811 100644 --- a/Python/dynload_win.c +++ b/Python/dynload_win.c @@ -254,9 +254,9 @@ dl_funcptr _PyImport_GetDynLoadWindows(const char *shortname, theLength)); } if (message != NULL) { - PyErr_SetFromImportErrorWithNameAndPath(message, - PyUnicode_FromString(shortname), - pathname); + PyErr_SetImportError(message, PyUnicode_FromString(shortname), + pathname); + Py_DECREF(message); } return NULL; } else { |