diff options
author | Nicholas Clark <nick@ccl4.org> | 2003-01-21 22:27:21 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-01-22 13:01:15 +0000 |
commit | 04ca4930675dbe212bae84041b9a725458ccf5b8 (patch) | |
tree | d946f8485e2aeb6f5a71d92370ebe672897f1f21 /sv.c | |
parent | 1e56004eea7f1084f781747a68eb85600bd4218f (diff) | |
download | perl-04ca4930675dbe212bae84041b9a725458ccf5b8.tar.gz |
Re: [perl #9394] Re: [ID 20020525.002] coredump/ bad free warning in blead with SIGWARN
Message-ID: <20030121222720.GG293@Bagpuss.unfortu.net>
p4raw-id: //depot/perl@18557
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -7883,7 +7883,9 @@ Perl_sv_unref_flags(pTHX_ SV *sv, U32 flags) } SvRV(sv) = 0; SvROK_off(sv); - if (SvREFCNT(rv) != 1 || SvREADONLY(rv) || (flags & SV_IMMEDIATE_UNREF)) + /* You can't have a || SvREADONLY(rv) here, as $a = $$a, where $a was + assigned to as BEGIN {$a = \"Foo"} will fail. */ + if (SvREFCNT(rv) != 1 || (flags & SV_IMMEDIATE_UNREF)) SvREFCNT_dec(rv); else /* XXX Hack, but hard to make $a=$a->[1] work otherwise */ sv_2mortal(rv); /* Schedule for freeing later */ |