Kaydet (Commit) ad54c6d8 authored tarafından Victor Stinner's avatar Victor Stinner

Issue #15766: Fix a crash in imp.load_dynamic() on PyUnicode_FromString() failure

üst 9bd9cd3f
...@@ -139,9 +139,9 @@ dl_funcptr _PyImport_GetDynLoadFunc(const char *shortname, ...@@ -139,9 +139,9 @@ dl_funcptr _PyImport_GetDynLoadFunc(const char *shortname,
path = PyUnicode_FromString(pathname); path = PyUnicode_FromString(pathname);
mod_name = PyUnicode_FromString(shortname); mod_name = PyUnicode_FromString(shortname);
PyErr_SetImportError(error_ob, mod_name, path); PyErr_SetImportError(error_ob, mod_name, path);
Py_DECREF(error_ob); Py_XDECREF(error_ob);
Py_DECREF(path); Py_XDECREF(path);
Py_DECREF(mod_name); Py_XDECREF(mod_name);
return NULL; return NULL;
} }
if (fp != NULL && nhandles < 128) if (fp != NULL && nhandles < 128)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment