regcomp.c: Another memory leak regression
authorKarl Williamson <public@khwilliamson.com>
Fri, 20 May 2011 16:54:22 +0000 (10:54 -0600)
committerKarl Williamson <public@khwilliamson.com>
Fri, 20 May 2011 17:12:05 +0000 (11:12 -0600)
The reference count should be decremented upon freeing.

regcomp.c

index a1183d5..d2a60fa 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -5980,6 +5980,7 @@ S_invlist_destroy(pTHX_ HV* const invlist)
        UV *list = INT2PTR(UV *, SvUV(*list_ptr)); /* PERL_POISON needs lvalue */
        Safefree(list);
     }
+    SvREFCNT_dec(invlist);
 }
 
 STATIC void