mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
bpo-44553: Correct failure in tp_new for the union object (GH-27008) (GH-27009)
(cherry picked from commit bc39614856
)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
This commit is contained in:
parent
bea618d780
commit
000b9e803a
1 changed files with 2 additions and 2 deletions
|
@ -490,10 +490,10 @@ _Py_Union(PyObject *args)
|
|||
}
|
||||
|
||||
result->args = dedup_and_flatten_args(args);
|
||||
_PyObject_GC_TRACK(result);
|
||||
if (result->args == NULL) {
|
||||
PyObject_GC_Del(result);
|
||||
Py_DECREF(result);
|
||||
return NULL;
|
||||
}
|
||||
_PyObject_GC_TRACK(result);
|
||||
return (PyObject*)result;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue