Mercurial > cpython-lru_cache-weakref
diff Python/dynload_win.c @ 84078:ec854f76d6b9 3.3
Issue #18180: Fix ref leak in _PyImport_GetDynLoadWindows().
| author | Richard Oudkerk <shibturn@gmail.com> |
|---|---|
| date | Mon, 10 Jun 2013 15:38:54 +0100 |
| parents | 4db1b0bb3683 |
| children |
line wrap: on
line diff
--- a/Python/dynload_win.c Mon Jun 10 10:36:28 2013 +0200 +++ b/Python/dynload_win.c Mon Jun 10 15:38:54 2013 +0100 @@ -262,8 +262,9 @@ 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;
