Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 48f224c

Browse files
committed
Fix bug 126587: matchobject.groupdict() leaks memory because of a missing
DECREF
1 parent 738293d commit 48f224c

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Modules/_sre.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1996,6 +1996,7 @@ match_groupdict(MatchObject* self, PyObject* args, PyObject* kw)
19961996
}
19971997
/* FIXME: <fl> this can fail, right? */
19981998
PyDict_SetItem(result, key, item);
1999+
Py_DECREF(item);
19992000
}
20002001

20012002
Py_DECREF(keys);

0 commit comments

Comments
 (0)