diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-12-22 11:30:47 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-12-22 11:30:47 +0000 |
commit | c9ce39a9108fcb88216bc67ce14c52154d53f364 (patch) | |
tree | 273de75bbe4424c0a86c60511a70acebfce65c00 /gv.c | |
parent | 0c793b6f00b278111ed6958bc7f2b834f3da392c (diff) | |
download | perl-c9ce39a9108fcb88216bc67ce14c52154d53f364.tar.gz |
Unshare the shared string gp_file_hek only if it exists in a GP.
Not doing this will produce invalid frees in the global destruction
process, probably because the empty string will get freed several
times. This should be safe since gp_file_hek is only assigned a
new value with share_hek().
p4raw-id: //depot/perl@29610
Diffstat (limited to 'gv.c')
-rw-r--r-- | gv.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1442,7 +1442,8 @@ Perl_gp_free(pTHX_ GV *gv) return; } - unshare_hek(gp->gp_file_hek); + if (gp->gp_file_hek) + unshare_hek(gp->gp_file_hek); SvREFCNT_dec(gp->gp_sv); SvREFCNT_dec(gp->gp_av); /* FIXME - another reference loop GV -> symtab -> GV ? |