This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix leak in Devel-PPPort
[perl5.git] / dist / Devel-PPPort / parts / inc / misc
index 3d8ecb3..a8802a4 100644 (file)
@@ -418,6 +418,7 @@ OpSIBLING_tests()
        PREINIT:
                OP *x;
                OP *kid;
+               OP *middlekid;
                OP *lastkid;
                int count = 0;
                int failures = 0;
@@ -441,6 +442,7 @@ OpSIBLING_tests()
                        kid = OpSIBLING(kid);
                        lastkid = kid;
                }
+                middlekid = OpSIBLING(x);
 
                /* Should now have a sibling */
                if (! OpHAS_SIBLING(x) || ! OpSIBLING(x) ) {
@@ -484,6 +486,9 @@ OpSIBLING_tests()
                        failures++; warn("Op should have had a sib after maybesibset");
                }
 
+                op_free(lastkid);
+                op_free(middlekid);
+                op_free(x);
                RETVAL = failures;
        OUTPUT:
                RETVAL