Skip to content

Commit bc39614

Browse files
authored
bpo-44553: Correct failure in tp_new for the union object (GH-27008)
1 parent d968a63 commit bc39614

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Objects/unionobject.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -490,10 +490,10 @@ _Py_Union(PyObject *args)
490490
}
491491

492492
result->args = dedup_and_flatten_args(args);
493+
_PyObject_GC_TRACK(result);
493494
if (result->args == NULL) {
494-
PyObject_GC_Del(result);
495+
Py_DECREF(result);
495496
return NULL;
496497
}
497-
_PyObject_GC_TRACK(result);
498498
return (PyObject*)result;
499499
}

0 commit comments

Comments
 (0)