mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 06:39:12 +02:00
lhelp: fixed another memleak
git-svn-id: trunk@17132 -
This commit is contained in:
parent
ffe4b6d211
commit
b5679ab4ee
@ -177,7 +177,12 @@ var
|
|||||||
fPos: Integer;
|
fPos: Integer;
|
||||||
Line: String;
|
Line: String;
|
||||||
begin
|
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
|
for X := StartLine to fText.Count-1 do begin
|
||||||
Line := fText.Strings[X];
|
Line := fText.Strings[X];
|
||||||
fPos := Pos('<param name="name" value="', LowerCase(Line));
|
fPos := Pos('<param name="name" value="', LowerCase(Line));
|
||||||
|
Loading…
Reference in New Issue
Block a user