Skip to content

Commit 9861a58

Browse files
committed
Always initialize result
1 parent f8648ab commit 9861a58

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Objects/typeobject.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5931,6 +5931,9 @@ _PyType_GetBaseByToken_Borrow(PyTypeObject *type, void *token, PyTypeObject **re
59315931
int
59325932
PyType_GetBaseByToken(PyTypeObject *type, void *token, PyTypeObject **result)
59335933
{
5934+
if (result != NULL) {
5935+
*result = NULL;
5936+
}
59345937
if (token == NULL) {
59355938
PyErr_Format(PyExc_SystemError,
59365939
"PyType_GetBaseByToken called with token=NULL");

0 commit comments

Comments
 (0)