This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dba3f18
)
Fix aliasing to an non-existent element of %+
author
Rafael Garcia-Suarez
<rgarciasuarez@gmail.com>
Wed, 11 Oct 2006 09:59:15 +0000
(09:59 +0000)
committer
Rafael Garcia-Suarez
<rgarciasuarez@gmail.com>
Wed, 11 Oct 2006 09:59:15 +0000
(09:59 +0000)
(by Yves Orton)
p4raw-id: //depot/perl@28995
hv.c
patch
|
blob
|
blame
|
history
diff --git
a/hv.c
b/hv.c
index
1432077
..
e482d56
100644
(file)
--- 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);