summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Oudkerk <shibturn@gmail.com>2013-06-10 14:45:30 (GMT)
committerRichard Oudkerk <shibturn@gmail.com>2013-06-10 14:45:30 (GMT)
commitcac17b4d78fdc8ad617e59281160749c91665fb3 (patch)
tree61c1064e9c232af90c3957610f3b102fc42a18af
parent75b84266987737fe87c120e871bcd1f0261c9ae8 (diff)
parent409f90237c07d2365f6e0b527071e74415c073f3 (diff)
downloadcpython-cac17b4d78fdc8ad617e59281160749c91665fb3.zip
cpython-cac17b4d78fdc8ad617e59281160749c91665fb3.tar.gz
cpython-cac17b4d78fdc8ad617e59281160749c91665fb3.tar.bz2
Merge.
-rw-r--r--Misc/NEWS2
-rw-r--r--Python/dynload_win.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index 14f17b3..0911309 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -10,6 +10,8 @@ What's New in Python 3.4.0 Alpha 1?
Core and Builtins
-----------------
+- Issue #18180: Fix ref leak in _PyImport_GetDynLoadWindows().
+
- Issue #18038: SyntaxError raised during compilation sources with illegal
encoding now always contains an encoding name.
diff --git a/Python/dynload_win.c b/Python/dynload_win.c
index edb6038..ffcf0ee 100644
--- a/Python/dynload_win.c
+++ b/Python/dynload_win.c
@@ -262,8 +262,9 @@ dl_funcptr _PyImport_GetDynLoadWindows(const char *shortname,
theLength));
}
if (message != NULL) {
- PyErr_SetImportError(message, PyUnicode_FromString(shortname),
- pathname);
+ PyObject *shortname_obj = PyUnicode_FromString(shortname);
+ PyErr_SetImportError(message, shortname_obj, pathname);
+ Py_XDECREF(shortname_obj);
Py_DECREF(message);
}
return NULL;