mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
fix import related leaks
This commit is contained in:
parent
855d0b3602
commit
7f9fa97ca2
2 changed files with 23 additions and 17 deletions
|
@ -47,14 +47,10 @@ builtin___import__(self, args)
|
|||
object *args;
|
||||
{
|
||||
char *name;
|
||||
object *m;
|
||||
|
||||
if (!newgetargs(args, "s:__import__", &name))
|
||||
return NULL;
|
||||
m = import_module(name);
|
||||
XINCREF(m);
|
||||
|
||||
return m;
|
||||
return import_module(name);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue