parent
0a4edd5435
commit
e9ddbf65a8
|
@ -3705,12 +3705,15 @@ imp_load_dynamic(PyObject *self, PyObject *args)
|
||||||
return NULL;
|
return NULL;
|
||||||
if (fob != NULL) {
|
if (fob != NULL) {
|
||||||
fp = get_file(NULL, fob, "r");
|
fp = get_file(NULL, fob, "r");
|
||||||
if (fp == NULL)
|
if (fp == NULL) {
|
||||||
|
Py_DECREF(pathname);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
fp = NULL;
|
fp = NULL;
|
||||||
mod = _PyImport_LoadDynamicModule(name, pathname, fp);
|
mod = _PyImport_LoadDynamicModule(name, pathname, fp);
|
||||||
|
Py_DECREF(pathname);
|
||||||
if (fp)
|
if (fp)
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
return mod;
|
return mod;
|
||||||
|
|
Loading…
Reference in New Issue