summaryrefslogtreecommitdiffstats
path: root/Objects/setobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/setobject.c')
-rw-r--r--Objects/setobject.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Objects/setobject.c b/Objects/setobject.c
index 9f39fcb..69eb889 100644
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -1942,9 +1942,10 @@ set_discard(PySetObject *so, PyObject *key)
tmpkey = make_new_set(&PyFrozenSet_Type, key);
if (tmpkey == NULL)
return NULL;
- result = set_discard_key(so, tmpkey);
+ rv = set_discard_key(so, tmpkey);
Py_DECREF(tmpkey);
- return result;
+ if (rv == -1)
+ return NULL;
}
Py_RETURN_NONE;
}