Commit 6d3d02c6 authored by Miss Islington (bot)'s avatar Miss Islington (bot) Committed by GitHub

bpo-33391: Fix refleak in set_symmetric_difference (GH-6670)

(cherry picked from commit 491bbedc)
Co-authored-by: default avatarlekma <lekmalek@gmail.com>
parent 5818f089
......@@ -1710,8 +1710,10 @@ set_symmetric_difference(PySetObject *so, PyObject *other)
if (otherset == NULL)
return NULL;
rv = set_symmetric_difference_update(otherset, (PyObject *)so);
if (rv == NULL)
if (rv == NULL) {
Py_DECREF(otherset);
return NULL;
}
Py_DECREF(rv);
return (PyObject *)otherset;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment