SF patch #1020188: Use Py_CLEAR where necessary to avoid crashes

(Contributed by Dima Dorfman)
This commit is contained in:
Raymond Hettinger 2004-09-01 07:02:44 +00:00
parent 410eb84a5d
commit 75ccea3777
5 changed files with 8 additions and 17 deletions

View file

@ -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;
}