summaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2019-04-03 14:14:13 +0100
committerDavid Mitchell <davem@iabyn.com>2019-04-03 14:14:13 +0100
commit807c5598a03d2cd87b685a099c1e2ee197615df8 (patch)
tree1c102e1f932956f7fd64110681969064f9e95d77 /dist
parent6d65cb5d847ac93680949c4fa02111808207fbdc (diff)
downloadperl-807c5598a03d2cd87b685a099c1e2ee197615df8.tar.gz
fix leak in Devel-PPPort
The leaky code is only used during test. It creates 3 ops, does various operations related to linking OpSIBLINGs, then fails to free them.
Diffstat (limited to 'dist')
-rw-r--r--dist/Devel-PPPort/parts/inc/misc5
1 files changed, 5 insertions, 0 deletions
diff --git a/dist/Devel-PPPort/parts/inc/misc b/dist/Devel-PPPort/parts/inc/misc
index 3d8ecb3ce9..a8802a49d0 100644
--- a/dist/Devel-PPPort/parts/inc/misc
+++ b/dist/Devel-PPPort/parts/inc/misc
@@ -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