summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2013-10-18 18:03:16 (GMT)
committerBrett Cannon <brett@python.org>2013-10-18 18:03:16 (GMT)
commitbaced5668a5d251b8838a657baa0f648aa6afd10 (patch)
tree7e3efc9c66f3befc69ee59ad80af31981b039ed6
parent1830601cc12118af03a826fad2ef930194cd2c8b (diff)
downloadcpython-baced5668a5d251b8838a657baa0f648aa6afd10.zip
cpython-baced5668a5d251b8838a657baa0f648aa6afd10.tar.gz
cpython-baced5668a5d251b8838a657baa0f648aa6afd10.tar.bz2
Fix a refleak in _sre
-rw-r--r--Misc/NEWS2
-rw-r--r--Modules/_sre.c1
2 files changed, 3 insertions, 0 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index ffd8433..a0af8cd 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -54,6 +54,8 @@ Core and Builtins
Library
-------
+- Fix a reference count leak in _sre.
+
- Issue #19262: Initial check in of the 'asyncio' package (a.k.a. Tulip,
a.k.a. PEP 3156). There are no docs yet, and the PEP is slightly
out of date with the code. This module will have *provisional* status
diff --git a/Modules/_sre.c b/Modules/_sre.c
index 2b00121..0db4ebe 100644
--- a/Modules/_sre.c
+++ b/Modules/_sre.c
@@ -2427,6 +2427,7 @@ next:
else
item = PyUnicode_Join(joiner, list);
Py_DECREF(joiner);
+ Py_DECREF(list);
if (!item)
return NULL;
}