]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
oops. accidentally reintroduced a memory leak. put the bugfix back.
authorFredrik Lundh <fredrik@pythonware.com>
Sun, 27 Aug 2000 21:32:46 +0000 (21:32 +0000)
committerFredrik Lundh <fredrik@pythonware.com>
Sun, 27 Aug 2000 21:32:46 +0000 (21:32 +0000)
Modules/_sre.c

index f5698f14778cd5c93ffdf9f96c4e0112fa007534..61ee694ad42b62abbf131d0f80f8a9a64fdd71c1 100644 (file)
@@ -1704,10 +1704,11 @@ 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);