summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/itertoolsmodule.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Modules/itertoolsmodule.c b/Modules/itertoolsmodule.c
index 21659fb..bf2c493 100644
--- a/Modules/itertoolsmodule.c
+++ b/Modules/itertoolsmodule.c
@@ -250,8 +250,7 @@ _grouper_next(_grouperobject *igo)
r = gbo->currvalue;
gbo->currvalue = NULL;
- Py_DECREF(gbo->currkey);
- gbo->currkey = NULL;
+ Py_CLEAR(gbo->currkey);
return r;
}