From baced5668a5d251b8838a657baa0f648aa6afd10 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Fri, 18 Oct 2013 14:03:16 -0400 Subject: [PATCH] Fix a refleak in _sre --- Misc/NEWS | 2 ++ Modules/_sre.c | 1 + 2 files changed, 3 insertions(+) diff --git a/Misc/NEWS b/Misc/NEWS index ffd8433a7d..a0af8cdd59 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 2b00121a25..0db4ebed71 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; } -- 2.49.0