This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
69495e6
)
Re: [perl #20408] SV's SvPVX get freed even when its SvLEN is zero
author
Adrian M. Enache
<enache@rdslink.ro>
Sun, 26 Jan 2003 04:55:48 +0000
(06:55 +0200)
committer
Abhijit Menon-Sen
<ams@wiw.org>
Sun, 26 Jan 2003 02:50:44 +0000
(
02:50
+0000)
Message-Id: <
20030126025548
.GB812@ratsnest.hole>
p4raw-id: //depot/perl@18579
pp_ctl.c
patch
|
blob
|
blame
|
history
diff --git
a/pp_ctl.c
b/pp_ctl.c
index
ed392cc
..
1a3fd1d
100644
(file)
--- a/
pp_ctl.c
+++ b/
pp_ctl.c
@@
-182,7
+182,8
@@
PP(pp_substcont)
cx->sb_rxtainted |= RX_MATCH_TAINTED(rx);
(void)SvOOK_off(targ);
- Safefree(SvPVX(targ));
+ if (SvLEN(targ))
+ Safefree(SvPVX(targ));
SvPVX(targ) = SvPVX(dstr);
SvCUR_set(targ, SvCUR(dstr));
SvLEN_set(targ, SvLEN(dstr));