diff options
author | Thomas Wouters <thomas@python.org> | 2006-04-05 13:39:37 (GMT) |
---|---|---|
committer | Thomas Wouters <thomas@python.org> | 2006-04-05 13:39:37 (GMT) |
commit | 4bdaa271d6fb56f766a9fc05e8134eee2e515ff9 (patch) | |
tree | 46fcdbbaa49c393f9dc25c20ec3125088e9bb4af /Python | |
parent | 22495c02e23022e8dd4bf509d97e69270dbde92c (diff) | |
download | cpython-4bdaa271d6fb56f766a9fc05e8134eee2e515ff9.zip cpython-4bdaa271d6fb56f766a9fc05e8134eee2e515ff9.tar.gz cpython-4bdaa271d6fb56f766a9fc05e8134eee2e515ff9.tar.bz2 |
Fix refleak in __import__("") (probably the cause of the 2 refleaks in
test_builtin.)
Diffstat (limited to 'Python')
-rw-r--r-- | Python/import.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/import.c b/Python/import.c index 6a47d95..c3bd275 100644 --- a/Python/import.c +++ b/Python/import.c @@ -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 an empty module name: someone called __import__("") or doctored faulty bytecode */ + Py_DECREF(tail); + Py_DECREF(head); PyErr_SetString(PyExc_ValueError, "Empty module name"); return NULL; |