summaryrefslogtreecommitdiff
path: root/hv.c
diff options
context:
space:
mode:
authorAlex Vandiver <alexmv@mit.edu>2009-05-29 20:17:36 -0400
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2009-05-30 15:57:38 +0200
commitcda5537682a2f5132de1e0387c105e67a72efce4 (patch)
tree2f8efac5300c777f4d3fc36ea675288c8ea3e7d5 /hv.c
parentf6c108d16c4c959f6b02d66f43f3ee84cbcc24b8 (diff)
downloadperl-cda5537682a2f5132de1e0387c105e67a72efce4.tar.gz
Fix [RT#63110] -- two small memory leaks were introduced in 5b9c067
Diffstat (limited to 'hv.c')
-rw-r--r--hv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hv.c b/hv.c
index a6b4448cd3..79d1944b9c 100644
--- a/hv.c
+++ b/hv.c
@@ -1444,7 +1444,7 @@ Perl_hv_copy_hints_hv(pTHX_ HV *const ohv)
while ((entry = hv_iternext_flags(ohv, 0))) {
SV *const sv = newSVsv(HeVAL(entry));
sv_magic(sv, NULL, PERL_MAGIC_hintselem,
- (char *)newSVhek (HeKEY_hek(entry)), HEf_SVKEY);
+ (char *)sv_2mortal(newSVhek (HeKEY_hek(entry))), HEf_SVKEY);
(void)hv_store_flags(hv, HeKEY(entry), HeKLEN(entry),
sv, HeHASH(entry), HeKFLAGS(entry));
}