* taddnode.first_addstring, avoid memory leak if

left or right is an empty string.

git-svn-id: trunk@5550 -
This commit is contained in:
pierre 2006-12-07 13:03:51 +00:00
parent 501f66e0ca
commit b486f926ce

View File

@ -1596,6 +1596,7 @@ implementation
if (left.nodetype=stringconstn) and (tstringconstnode(left).len=0) then if (left.nodetype=stringconstn) and (tstringconstnode(left).len=0) then
begin begin
result:=right; result:=right;
left.free;
left:=nil; left:=nil;
right:=nil; right:=nil;
exit; exit;
@ -1604,6 +1605,7 @@ implementation
begin begin
result:=left; result:=left;
left:=nil; left:=nil;
right.free;
right:=nil; right:=nil;
exit; exit;
end; end;