_threadmodule
does not check for NULL
after PyType_GetModuleByDef
calls
#114414
Labels
_threadmodule
does not check for NULL
after PyType_GetModuleByDef
calls
#114414
Bug report
PyType_GetModuleByDef
can returnNULL
:cpython/Objects/typeobject.c
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 forNULL
. 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
Linked PRs
NULL
afterPyType_GetModuleByDef
in_threadmodule
#114415The text was updated successfully, but these errors were encountered: