summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/_sre.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_sre.c b/Modules/_sre.c
index 29e92ac..3b78fb9 100644
--- a/Modules/_sre.c
+++ b/Modules/_sre.c
@@ -1698,10 +1698,10 @@ pattern_findall(PatternObject* self, PyObject* args)
break;
}
- if (PyList_Append(list, item) < 0) {
- Py_DECREF(item);
+ status = PyList_Append(list, item);
+ Py_DECREF(item);
+ if (status < 0)
goto error;
- }
if (state.ptr == state.start)
state.start = (void*) ((char*) state.ptr + state.charsize);