diff options
author | Perl 5 Porters <perl5-porters@africa.nicoh.com> | 1996-07-05 05:01:26 +0000 |
---|---|---|
committer | Charles Bailey <bailey@genetics.upenn.edu> | 1996-07-05 05:01:26 +0000 |
commit | 03d5e78e23137ad2106be45fc1159128bae29695 (patch) | |
tree | b9fe1241c0fc5d5a3be8be9b3d39394b54cafbb0 /cop.h | |
parent | 9193ea202a5ecd4b4499827df9feee2bd976bc17 (diff) | |
download | perl-03d5e78e23137ad2106be45fc1159128bae29695.tar.gz |
perl 5.003_01: cop.h
Increment refcount on @_ when passed through to another sub,
so it's not freed twiceon return.
Diffstat (limited to 'cop.h')
-rw-r--r-- | cop.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -52,6 +52,9 @@ struct block_sub { } \ if (cx->blk_sub.cv) { \ if (!(CvDEPTH(cx->blk_sub.cv) = cx->blk_sub.olddepth)) { \ + if (cx->blk_sub.hasargs) { \ + SvREFCNT_inc((SV*)cx->blk_sub.argarray); \ + } \ SvREFCNT_dec((SV*)cx->blk_sub.cv); \ } \ } |