summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2024-02-17 21:18:30 (GMT)
committerGitHub <noreply@github.com>2024-02-17 21:18:30 (GMT)
commit090dd21ab9379d6a2a6923d6cbab697355fb7165 (patch)
tree0979b9e8e3b11a590902c5745fe817943a888c33 /Objects
parentaba37d451fabb44a7f478958ba117ae5b6ea54c0 (diff)
downloadcpython-090dd21ab9379d6a2a6923d6cbab697355fb7165.zip
cpython-090dd21ab9379d6a2a6923d6cbab697355fb7165.tar.gz
cpython-090dd21ab9379d6a2a6923d6cbab697355fb7165.tar.bz2
gh-115618: Remove improper Py_XDECREFs in property methods (GH-115619)
Diffstat (limited to 'Objects')
-rw-r--r--Objects/descrobject.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/Objects/descrobject.c b/Objects/descrobject.c
index 805de29..c4cd51b 100644
--- a/Objects/descrobject.c
+++ b/Objects/descrobject.c
@@ -1730,15 +1730,12 @@ property_copy(PyObject *old, PyObject *get, PyObject *set, PyObject *del)
return NULL;
if (get == NULL || get == Py_None) {
- Py_XDECREF(get);
get = pold->prop_get ? pold->prop_get : Py_None;
}
if (set == NULL || set == Py_None) {
- Py_XDECREF(set);
set = pold->prop_set ? pold->prop_set : Py_None;
}
if (del == NULL || del == Py_None) {
- Py_XDECREF(del);
del = pold->prop_del ? pold->prop_del : Py_None;
}
if (pold->getter_doc && get != Py_None) {