Even more regexp charclass leaks
authorFather Chrysostomos <sprout@cpan.org>
Fri, 9 Nov 2012 14:14:49 +0000 (06:14 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 12 Nov 2012 06:17:30 +0000 (22:17 -0800)
regcomp.c
t/op/svleak.t

index e472fc0..7007e55 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -12600,6 +12600,7 @@ parseit:
 
             RExC_parse = (char *) cur_parse;
 
+            SvREFCNT_dec(posixes);
             SvREFCNT_dec(listsv);
             SvREFCNT_dec(cp_list);
             return ret;
@@ -13086,6 +13087,7 @@ parseit:
                 alloc_maybe_populate_EXACT(pRExC_state, ret, flagp, 0, value);
             }
 
+            SvREFCNT_dec(cp_list);
             SvREFCNT_dec(listsv);
             return ret;
         }
index 964bcbb..ceaf480 100644 (file)
@@ -15,7 +15,7 @@ BEGIN {
 
 use Config;
 
-plan tests => 58;
+plan tests => 60;
 
 # run some code N times. If the number of SVs at the end of loop N is
 # greater than (N-1)*delta at the end of loop 1, we've got a leak
@@ -176,6 +176,8 @@ leak(2, 0,
 eleak(2,0,'/[:]/');
 eleak(2,0,'/[\xdf]/i');
 eleak(2,0,'s![^/]!!');
+eleak(2,0,'/[pp]/');
+eleak(2,0,'/[[:ascii:]]/');
 
 leak(2,0,sub { !$^V }, '[perl #109762] version object in boolean context');