From a0640ddd05f0316b72f3b31be7802f53fe06657e Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Fri, 15 Nov 2019 15:01:15 -0700 Subject: [PATCH] PATCH: gh#17218 memory leak Indeed, a variable's ref count was not getting decremented. (cherry picked from commit 0463f3a19af7afac8b402655ad66e5b05c095bcc) --- regcomp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/regcomp.c b/regcomp.c index 88282081a893..ad52e70c2cde 100644 --- a/regcomp.c +++ b/regcomp.c @@ -18159,6 +18159,7 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth, /* Likewise for 'posixes' */ _invlist_union(posixes, cp_list, &cp_list); + SvREFCNT_dec(posixes); /* Likewise for anything else in the range that matched only * under UTF-8 */