summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorLarry Wall <lwall@netlabs.com>1995-03-13 16:43:53 -0800
committerAndy Dougherty <doughera@lafcol.lafayette.edu>1995-03-15 12:25:31 +1300
commitcb0b1708c66ad12be7ce52c00b9565faecc67579 (patch)
treea00bd0a909256197e93ece28385885d7fa663be1 /pp_hot.c
parente9a444f0e2e25089238ff153c447ef9ed7d3f72c (diff)
downloadperl-cb0b1708c66ad12be7ce52c00b9565faecc67579.tar.gz
[fix s/// memory leak]
In fixing another bug I installed a nasty memory leak in s///. Here's the fix. Larry
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/pp_hot.c b/pp_hot.c
index 7bfec4a57c..dedb2177ed 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -1451,6 +1451,7 @@ PP(pp_subst)
safebase));
sv_catpvn(dstr, s, strend - s);
+ Safefree(SvPVX(TARG));
SvPVX(TARG) = SvPVX(dstr);
SvCUR_set(TARG, SvCUR(dstr));
SvLEN_set(TARG, SvLEN(dstr));