mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-03 22:20:17 +02: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
|
||||
Lines: TStringList;
|
||||
begin
|
||||
Result:=false;
|
||||
if FileExistsUTF8(RevisionIncFileName) then begin
|
||||
Result := FileExistsUTF8(RevisionIncFileName);
|
||||
if Result then
|
||||
begin
|
||||
Lines := TStringList.Create;
|
||||
Lines.LoadFromFile(UTF8ToSys(RevisionIncFileName));
|
||||
if (Lines.Count=2) and
|
||||
(Lines[0]=RevisionIncComment) and
|
||||
(copy(Lines[1], 1, length(ConstStart))=ConstStart) then
|
||||
Result:=true;
|
||||
try
|
||||
Lines.LoadFromFile(UTF8ToSys(RevisionIncFileName));
|
||||
Result := (Lines.Count = 2) and
|
||||
(Lines[0] = RevisionIncComment) and
|
||||
(Copy(Lines[1], 1, Length(ConstStart)) = ConstStart);
|
||||
finally
|
||||
Lines.Free;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user