04bfb0
From 0463f3a19af7afac8b402655ad66e5b05c095bcc Mon Sep 17 00:00:00 2001
04bfb0
From: Karl Williamson <khw@cpan.org>
04bfb0
Date: Fri, 15 Nov 2019 15:01:15 -0700
04bfb0
Subject: [PATCH] PATCH: gh#17218 memory leak
04bfb0
MIME-Version: 1.0
04bfb0
Content-Type: text/plain; charset=UTF-8
04bfb0
Content-Transfer-Encoding: 8bit
04bfb0
04bfb0
Indeed, a variable's ref count was not getting decremented.
04bfb0
04bfb0
Signed-off-by: Petr Písař <ppisar@redhat.com>
04bfb0
---
04bfb0
 regcomp.c | 1 +
04bfb0
 1 file changed, 1 insertion(+)
04bfb0
04bfb0
diff --git a/regcomp.c b/regcomp.c
04bfb0
index 076ea350b5..7b9bf6ba7d 100644
04bfb0
--- a/regcomp.c
04bfb0
+++ b/regcomp.c
04bfb0
@@ -18180,6 +18180,7 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth,
04bfb0
 
04bfb0
                 /* Likewise for 'posixes' */
04bfb0
                 _invlist_union(posixes, cp_list, &cp_list);
04bfb0
+                SvREFCNT_dec(posixes);
04bfb0
 
04bfb0
                 /* Likewise for anything else in the range that matched only
04bfb0
                  * under UTF-8 */
04bfb0
-- 
04bfb0
2.21.0
04bfb0