Closed
Description
Bug report
PyType_GetModuleByDef
can return NULL
:
Lines 4640 to 4645 in fd49e22
I think that right now this is a hypothetical issue, because in practice NULL
will never be returned for these samples. But, all other similar places do check for NULL
. I guess that adding a check won't hurt. And in the future, if something changes - we would be safe.
Samples:
cpython/Modules/_threadmodule.c
Lines 903 to 904 in fd49e22
cpython/Modules/_threadmodule.c
Lines 1044 to 1045 in fd49e22
cpython/Modules/_threadmodule.c
Lines 1096 to 1097 in fd49e22