regcomp.c: Avoid leaking a scalar
authorKarl Williamson <public@khwilliamson.com>
Thu, 5 Jan 2012 22:17:18 +0000 (15:17 -0700)
committerKarl Williamson <public@khwilliamson.com>
Fri, 13 Jan 2012 16:58:38 +0000 (09:58 -0700)
regcomp.c

index 2d6bb7f..7dcd20e 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -10725,6 +10725,7 @@ parseit:
        if (! PL_utf8_foldable) {
            SV* swash = swash_init("utf8", "Cased", &PL_sv_undef, 1, 0);
            PL_utf8_foldable = _swash_to_invlist(swash);
+            SvREFCNT_dec(swash);
        }
 
        /* This is a hash that for a particular fold gives all characters