From 09b86d1196427f2028d7e072b106847d8c693815 Mon Sep 17 00:00:00 2001 From: Brian Curtin Date: Tue, 17 Apr 2012 16:57:09 -0500 Subject: Fix #14600. Correct reference handling and naming of ImportError convenience function --- Python/dynload_win.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Python/dynload_win.c') 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 { -- cgit v1.2.1