Message378384
There is a reference leak in import_add_module(). PyDict_GetItemWithError() returns a borrowed reference, but PyObject_GetItem() return a non-borrowed reference. If sys.modules is not a dict, there is a reference leak. import_add_module() and several other function which return a borrowed reference should be made returning a non-borrowed reference, because there are no guaranties that general mapping keeps reference to value.
It is still not guarantee correctness of PyImport_AddModuleObject(). |
|
Date |
User |
Action |
Args |
2020-10-10 11:14:48 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, brett.cannon, ncoghlan, eric.snow |
2020-10-10 11:14:48 | serhiy.storchaka | set | messageid: <1602328488.44.0.393274794411.issue41994@roundup.psfhosted.org> |
2020-10-10 11:14:48 | serhiy.storchaka | link | issue41994 messages |
2020-10-10 11:14:48 | serhiy.storchaka | create | |
|