mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-18 03:29:29 +01:00
tools: fix memory leak in TSvn2RevisionApplication.IsValidRevisionInc
git-svn-id: trunk@37028 -
This commit is contained in:
parent
0a35a31f1d
commit
83ced3ec16
@ -260,14 +260,18 @@ function TSvn2RevisionApplication.IsValidRevisionInc: boolean;
|
|||||||
var
|
var
|
||||||
Lines: TStringList;
|
Lines: TStringList;
|
||||||
begin
|
begin
|
||||||
Result:=false;
|
Result := FileExistsUTF8(RevisionIncFileName);
|
||||||
if FileExistsUTF8(RevisionIncFileName) then begin
|
if Result then
|
||||||
|
begin
|
||||||
Lines := TStringList.Create;
|
Lines := TStringList.Create;
|
||||||
Lines.LoadFromFile(UTF8ToSys(RevisionIncFileName));
|
try
|
||||||
if (Lines.Count=2) and
|
Lines.LoadFromFile(UTF8ToSys(RevisionIncFileName));
|
||||||
(Lines[0]=RevisionIncComment) and
|
Result := (Lines.Count = 2) and
|
||||||
(copy(Lines[1], 1, length(ConstStart))=ConstStart) then
|
(Lines[0] = RevisionIncComment) and
|
||||||
Result:=true;
|
(Copy(Lines[1], 1, Length(ConstStart)) = ConstStart);
|
||||||
|
finally
|
||||||
|
Lines.Free;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user