bpo-33803: Fix a crash in hamt.c (#7504)
This commit is contained in:
parent
c4f3cb772b
commit
378c53cc31
|
@ -0,0 +1,2 @@
|
|||
Fix a crash in hamt.c caused by enabling GC tracking for an object that
|
||||
hadn't all of its fields set to NULL.
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue