This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
PATCH: [perl #132548] regcomp.c Fix memory leak
authorKarl Williamson <khw@cpan.org>
Fri, 8 Dec 2017 14:27:13 +0000 (07:27 -0700)
committerKarl Williamson <khw@cpan.org>
Fri, 8 Dec 2017 14:30:33 +0000 (07:30 -0700)
regcomp.c

index 29af44c..83d6699 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -17721,6 +17721,7 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth,
                 if (_invlist_len(only_non_utf8_list) != 0) {
                     ANYOF_FLAGS(ret) |= ANYOF_SHARED_d_MATCHES_ALL_NON_UTF8_NON_ASCII_non_d_WARN_SUPER;
                 }
+                SvREFCNT_dec_NN(only_non_utf8_list);
             }
             else {
                 /* Here there were no complemented posix classes.  That means