summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-03-05 19:07:12 +0000
committerNicholas Clark <nick@ccl4.org>2006-03-05 19:07:12 +0000
commitae8cc45f19735266b98e68ac96abd0c5050c140f (patch)
tree2a7bb46f4e08a63e1a40ec2c267201e32414866e /sv.c
parent4164be692ecdc110086abd011eb6e1c41f13ed34 (diff)
downloadperl-ae8cc45f19735266b98e68ac96abd0c5050c140f.tar.gz
Perl_gv_name_set should not leak the old HEK. Allow the flag GV_ADD
to simplify GV initialisation. p4raw-id: //depot/perl@27382
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sv.c b/sv.c
index 17d8cc2069..a846af98aa 100644
--- a/sv.c
+++ b/sv.c
@@ -3216,7 +3216,7 @@ S_glob_assign_glob(pTHX_ SV *dstr, SV *sstr, const int dtype)
GvSTASH(dstr) = GvSTASH(sstr);
if (GvSTASH(dstr))
Perl_sv_add_backref(aTHX_ (SV*)GvSTASH(dstr), dstr);
- gv_name_set((GV *)dstr, name, len, 0);
+ gv_name_set((GV *)dstr, name, len, GV_ADD);
SvFAKE_on(dstr); /* can coerce to non-glob */
}