summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Objects/funcobject.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/Objects/funcobject.c b/Objects/funcobject.c
index 5db86a6721..6cbf297c58 100644
--- a/Objects/funcobject.c
+++ b/Objects/funcobject.c
@@ -965,10 +965,8 @@ sm_traverse(staticmethod *sm, visitproc visit, void *arg)
static int
sm_clear(staticmethod *sm)
{
- Py_XDECREF(sm->sm_callable);
- sm->sm_callable = NULL;
+ Py_CLEAR(sm->sm_callable);
Py_CLEAR(sm->sm_dict);
-
return 0;
}