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 /Objects/enumobject.c | |
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 'Objects/enumobject.c')
-rw-r--r-- | Objects/enumobject.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Objects/enumobject.c b/Objects/enumobject.c index ebe7e7c..aac88db 100644 --- a/Objects/enumobject.c +++ b/Objects/enumobject.c @@ -230,10 +230,7 @@ reversed_next(reversedobject *ro) PyErr_Clear(); } ro->index = -1; - if (ro->seq != NULL) { - Py_DECREF(ro->seq); - ro->seq = NULL; - } + Py_CLEAR(ro->seq); return NULL; } |