summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-10-19 13:26:19 +0200
committerNicholas Clark <nick@ccl4.org>2010-10-19 13:27:26 +0200
commitd086148c4193252081799d1c5bc16c6cc3f5ae1a (patch)
tree721826c7791500e464e7395ff4d943c3eae91265 /pp_ctl.c
parent228f83bf2f4cc0f605478d266ed3a2dd48cb7041 (diff)
downloadperl-d086148c4193252081799d1c5bc16c6cc3f5ae1a.tar.gz
Stop 'use v5.8' leaking memory. Fixes #78436.
Based on a patch proposed by Niko Tyni.
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index a9d92f10d5..16e7cf93a7 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -3398,7 +3398,7 @@ PP(pp_require)
sv = POPs;
if ( (SvNIOKp(sv) || SvVOK(sv)) && PL_op->op_type != OP_DOFILE) {
- sv = new_version(sv);
+ sv = sv_2mortal(new_version(sv));
if (!sv_derived_from(PL_patchlevel, "version"))
upg_version(PL_patchlevel, TRUE);
if (cUNOP->op_first->op_type == OP_CONST && cUNOP->op_first->op_private & OPpCONST_NOVER) {