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