mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 07:06:08 +02:00
* taddnode.first_addstring, avoid memory leak if
left or right is an empty string. git-svn-id: trunk@5550 -
This commit is contained in:
parent
501f66e0ca
commit
b486f926ce
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user