Adrian M. Enache [Mon, 20 Jan 2003 01:54:07 +0000 (01:54 +0000)]
From: "enache@rdslink.ro (via RT)" <perlbug-followup@perl.org>
Message-Id: <rt-20408-49009.18.
2567818321236@bugs6.perl.org>
p4raw-id: //depot/perl@18522
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));