07c79c
From 70f089724b15d1b2ed9264f277454aa559d50232 Mon Sep 17 00:00:00 2001
07c79c
From: Karl Williamson <khw@cpan.org>
07c79c
Date: Fri, 15 Nov 2019 15:01:15 -0700
07c79c
Subject: [PATCH] PATCH: gh#17218 memory leak
07c79c
07c79c
Indeed, a variable's ref count was not getting decremented.
07c79c
---
07c79c
 regcomp.c | 1 +
07c79c
 1 file changed, 1 insertion(+)
07c79c
07c79c
diff --git a/regcomp.c b/regcomp.c
07c79c
index ddac290d2bf0..de4f6f24dac8 100644
07c79c
--- a/regcomp.c
07c79c
+++ b/regcomp.c
07c79c
@@ -17602,6 +17602,7 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth,
07c79c
 
07c79c
                 /* Likewise for 'posixes' */
07c79c
                 _invlist_union(posixes, cp_list, &cp_list);
07c79c
+                SvREFCNT_dec(posixes);
07c79c
 
07c79c
                 /* Likewise for anything else in the range that matched only
07c79c
                  * under UTF-8 */