diff options
author | Marcus Holland-Moritz <mhx-perl@gmx.net> | 2008-11-08 12:38:36 +0000 |
---|---|---|
committer | Marcus Holland-Moritz <mhx-perl@gmx.net> | 2008-11-08 12:38:36 +0000 |
commit | 414bf5ae0886eb91e2f6dbb35893ddb012852bef (patch) | |
tree | f12b56f04e73f7a435907e3ad3b060d2a96975a4 /regexec.c | |
parent | 2556f95e0f4f5e8e95c9766374614ab52edefe3d (diff) | |
download | perl-414bf5ae0886eb91e2f6dbb35893ddb012852bef.tar.gz |
Assigning to DEFSV leaks if PL_defgv's gp_sv isn't set.
As Nicholas already noted in a FIXME, assigning to DEFSV should
use GvSV instead of GvSVn. This change ensures that, at least
under -DPERL_CORE, DEFSV cannot be assigned to and introduces
a DEFSV_set macro to allow setting DEFSV.
This fixes #53038: map leaks memory.
p4raw-id: //depot/perl@34776
Diffstat (limited to 'regexec.c')
-rw-r--r-- | regexec.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2250,7 +2250,7 @@ S_regtry(pTHX_ regmatch_info *reginfo, char **startpos) /* Make $_ available to executed code. */ if (reginfo->sv != DEFSV) { SAVE_DEFSV; - DEFSV = reginfo->sv; + DEFSV_set(reginfo->sv); } if (!(SvTYPE(reginfo->sv) >= SVt_PVMG && SvMAGIC(reginfo->sv) |