Change 34973 by [EMAIL PROTECTED] on 2008/12/01 22:17:55
The temporary SV created in Perl_save_helem_flags() to store the key
can be freed immediately after it is used, as it is unrelated to
anything else. This folds SvREFCNT_dec()s on two code paths into one.
Affected files ...
... //depot/perl/scope.c#248 edit
Differences ...
==== //depot/perl/scope.c#248 (text) ====
Index: perl/scope.c
--- perl/scope.c#247~34970~ 2008-12-01 06:29:42.000000000 -0800
+++ perl/scope.c 2008-12-01 14:17:55.000000000 -0800
@@ -902,19 +902,18 @@
sv = MUTABLE_SV(SSPOPPTR);
hv = MUTABLE_HV(SSPOPPTR);
ptr = hv_fetch_ent(hv, sv, 1, 0);
+ SvREFCNT_dec(sv);
if (ptr) {
const SV * const oval = HeVAL((HE*)ptr);
if (oval && oval != &PL_sv_undef) {
ptr = &HeVAL((HE*)ptr);
if (SvTIED_mg((const SV *)hv, PERL_MAGIC_tied))
SvREFCNT_inc_void(*(SV**)ptr);
- SvREFCNT_dec(sv);
av = MUTABLE_AV(hv); /* what to refcnt_dec */
goto restore_sv;
}
}
SvREFCNT_dec(hv);
- SvREFCNT_dec(sv);
SvREFCNT_dec(value);
break;
case SAVEt_OP:
End of Patch.