diff options
author | Raymond Hettinger <python@rcn.com> | 2004-09-01 07:02:44 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2004-09-01 07:02:44 (GMT) |
commit | 75ccea3777f77f001102493170490874166eb3b2 (patch) | |
tree | 31c6cc1fc38e8928475d7dd3a04fe3e3d0b0a33c /Modules | |
parent | 410eb84a5d4e582491701d63d154959c05a457f4 (diff) | |
download | cpython-75ccea3777f77f001102493170490874166eb3b2.zip cpython-75ccea3777f77f001102493170490874166eb3b2.tar.gz cpython-75ccea3777f77f001102493170490874166eb3b2.tar.bz2 |
SF patch #1020188: Use Py_CLEAR where necessary to avoid crashes
(Contributed by Dima Dorfman)
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/itertoolsmodule.c | 3 |
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; } |