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