Change 18522 by jhi@lyta on 2003/01/20 17:43:15
Subject: [perl #20408] SV's SvPVX get freed even when its SvLEN is zero
From: "[EMAIL PROTECTED] (via RT)" <[EMAIL PROTECTED]>
Date: 20 Jan 2003 01:54:07 -0000
Message-Id: <[EMAIL PROTECTED]>
Affected files ...
... //depot/perl/pp_hot.c#300 edit
Differences ...
==== //depot/perl/pp_hot.c#300 (text) ====
Index: perl/pp_hot.c
--- perl/pp_hot.c#299~18485~ Wed Jan 15 12:10:57 2003
+++ perl/pp_hot.c Mon Jan 20 09:43:15 2003
@@ -2129,7 +2129,8 @@
sv_catpvn(dstr, s, strend - s);
(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));
End of Patch.