lhelp: fixed another memleak

git-svn-id: trunk@17132 -
This commit is contained in:
vincents 2008-10-25 13:31:25 +00:00
parent ffe4b6d211
commit b5679ab4ee

View File

@ -177,7 +177,12 @@ var
fPos: Integer;
Line: String;
begin
FillChar(Result, SizeOf(Result), 0);
// Don't use fillchar to initialize the result.
// The caller passes a pointer a record which may already contain strings and
// those will not be freed when we clean it with FillChar
Result.Name:='';
Result.Url:='';
Result.LineCount:= 0;
for X := StartLine to fText.Count-1 do begin
Line := fText.Strings[X];
fPos := Pos('<param name="name" value="', LowerCase(Line));