bpo-33803: Fix a crash in hamt.c (#7504)

This commit is contained in:
Yury Selivanov 2018-06-07 20:29:55 -04:00 committed by GitHub
parent c4f3cb772b
commit 378c53cc31
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View file

@ -2476,6 +2476,8 @@ hamt_alloc(void)
if (o == NULL) {
return NULL;
}
o->h_count = 0;
o->h_root = NULL;
o->h_weakreflist = NULL;
PyObject_GC_Track(o);
return o;