From cda5537682a2f5132de1e0387c105e67a72efce4 Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Fri, 29 May 2009 20:17:36 -0400 Subject: Fix [RT#63110] -- two small memory leaks were introduced in 5b9c067 --- hv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hv.c') 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)); } -- cgit v1.2.1