codetools: expreval: fixed mem leak

git-svn-id: trunk@22824 -
This commit is contained in:
mattias 2009-11-27 10:57:40 +00:00
parent 691f65044f
commit 427177187f

View File

@ -170,7 +170,7 @@ begin
end;
end;
procedure ClearOperandValue(var V: TOperandValue); inline;
procedure ClearOperandValue(out V: TOperandValue); inline;
begin
V.Free:=false;
V.Value:=nil;
@ -1183,6 +1183,7 @@ begin
if Result<>'' then
System.Move(Operand.Value^,Result[1],length(Result));
end;
FreeOperandValue(Operand);
end;
function TExpressionEvaluator.EvalPChar(Expression: PChar; ExprLen: PtrInt;
@ -1904,6 +1905,7 @@ var
Operand: TOperandValue;
begin
Result:=EvalPChar(Expression,ExprLen,Operand) and OperandIsTrue(Operand);
FreeOperandValue(Operand);
end;
function TExpressionEvaluator.AsString: string;