diff options
author | Pablo Galindo <Pablogsal@gmail.com> | 2021-07-03 20:00:28 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-03 20:00:28 (GMT) |
commit | bc3961485639cc73de7c4c7eed1b56f3c74939bf (patch) | |
tree | 56e2422b4228e7d959fee36e464bc1738386a502 /Objects | |
parent | d968a638fcbf9030c999cfacd4c9bf0656e779c4 (diff) | |
download | cpython-bc3961485639cc73de7c4c7eed1b56f3c74939bf.zip cpython-bc3961485639cc73de7c4c7eed1b56f3c74939bf.tar.gz cpython-bc3961485639cc73de7c4c7eed1b56f3c74939bf.tar.bz2 |
bpo-44553: Correct failure in tp_new for the union object (GH-27008)
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/unionobject.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/unionobject.c b/Objects/unionobject.c index cc7181d..8435763 100644 --- a/Objects/unionobject.c +++ b/Objects/unionobject.c @@ -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; } |