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