From: Rafael Garcia-Suarez Date: Wed, 11 Oct 2006 09:59:15 +0000 (+0000) Subject: Fix aliasing to an non-existent element of %+ X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cbc4ed9afe9ba8f26ad722a8ad1bb783a1771a4a;p=p5sagit%2Fp5-mst-13.2.git Fix aliasing to an non-existent element of %+ (by Yves Orton) p4raw-id: //depot/perl@28995 --- diff --git a/hv.c b/hv.c index 1432077..e482d56 100644 --- a/hv.c +++ b/hv.c @@ -467,10 +467,8 @@ S_hv_fetch_common(pTHX_ HV *hv, SV *keysv, const char *key, STRLEN klen, } if (regdata) { sv = Perl_reg_named_buff_sv(aTHX_ keysv); - if (!sv) { - SvREFCNT_dec(keysv); - return 0; - } + if (!sv) + sv = sv_newmortal(); } else { sv = sv_newmortal(); mg_copy((SV*)hv, sv, (char *)keysv, HEf_SVKEY);