From b486f926ce70a362db22e90369ec190818f2eed3 Mon Sep 17 00:00:00 2001 From: pierre Date: Thu, 7 Dec 2006 13:03:51 +0000 Subject: [PATCH] * taddnode.first_addstring, avoid memory leak if left or right is an empty string. git-svn-id: trunk@5550 - --- compiler/nadd.pas | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/nadd.pas b/compiler/nadd.pas index 433ebab276..fd375decee 100644 --- a/compiler/nadd.pas +++ b/compiler/nadd.pas @@ -1596,6 +1596,7 @@ implementation if (left.nodetype=stringconstn) and (tstringconstnode(left).len=0) then begin result:=right; + left.free; left:=nil; right:=nil; exit; @@ -1604,6 +1605,7 @@ implementation begin result:=left; left:=nil; + right.free; right:=nil; exit; end;