gh-104190: fix ubsan crash (#104191)

This commit is contained in:
sunmy2019 2023-05-05 17:54:03 +08:00 committed by GitHub
parent e5b8b19d99
commit 163034515a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4221,7 +4221,7 @@ PyInit__testcapi(void)
return NULL;
}
int ret = PyModule_AddType(m, (PyTypeObject*)ObjExtraData_Type);
Py_DECREF(&ObjExtraData_Type);
Py_DECREF(ObjExtraData_Type);
if (ret < 0) {
return NULL;
}