Kaydet (Commit) 4bdaa271 authored tarafından Thomas Wouters's avatar Thomas Wouters

Fix refleak in __import__("") (probably the cause of the 2 refleaks in

test_builtin.)
üst 22495c02
...@@ -1938,6 +1938,8 @@ import_module_level(char *name, PyObject *globals, PyObject *locals, ...@@ -1938,6 +1938,8 @@ import_module_level(char *name, PyObject *globals, PyObject *locals,
/* If tail is Py_None, both get_parent and load_next found /* If tail is Py_None, both get_parent and load_next found
an empty module name: someone called __import__("") or an empty module name: someone called __import__("") or
doctored faulty bytecode */ doctored faulty bytecode */
Py_DECREF(tail);
Py_DECREF(head);
PyErr_SetString(PyExc_ValueError, PyErr_SetString(PyExc_ValueError,
"Empty module name"); "Empty module name");
return NULL; return NULL;
......
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