File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424 * 2000-10-24 fl really fixed assert_not; reset groups in findall
2525 * 2000-12-21 fl fixed memory leak in groupdict
2626 * 2001-01-02 fl properly reset pointer after failed assertion in MIN_UNTIL
27- * 2001-01-15 fl don't use recursion for unbounded MIN_UTIL
27+ * 2001-01-15 fl don't use recursion for unbounded MIN_UTIL; fixed
28+ * 2001-01-16 fl fixed memory leak in pattern destructor
2829 *
2930 * Copyright (c) 1997-2001 by Secret Labs AB. All rights reserved.
3031 *
@@ -1234,8 +1235,10 @@ _compile(PyObject* self_, PyObject* args)
12341235
12351236 Py_DECREF (code );
12361237
1237- if (PyErr_Occurred ())
1238+ if (PyErr_Occurred ()) {
1239+ PyObject_DEL (self );
12381240 return NULL ;
1241+ }
12391242
12401243 Py_INCREF (pattern );
12411244 self -> pattern = pattern ;
@@ -1532,6 +1535,7 @@ pattern_dealloc(PatternObject* self)
15321535{
15331536 Py_XDECREF (self -> pattern );
15341537 Py_XDECREF (self -> groupindex );
1538+ Py_XDECREF (self -> indexgroup );
15351539 PyObject_DEL (self );
15361540}
15371541
You can’t perform that action at this time.
0 commit comments