codetools: Fix memory leak introduced in r54432 #5667c05f6c (TFPCTargetConfigCache.Includes was not freed in Clear method). Fix mantis #31575.

git-svn-id: trunk@54450 -
This commit is contained in:
hnb 2017-03-21 12:05:16 +00:00
parent 98e5d53303
commit d5739c0615

View File

@ -8292,6 +8292,7 @@ begin
FreeAndNil(UnitPaths);
FreeAndNil(IncludePaths);
FreeAndNil(Units);
FreeAndNil(Includes);
end;
function TFPCTargetConfigCache.Equals(Item: TFPCTargetConfigCache;
@ -8856,7 +8857,7 @@ begin
end;
// gather all units in all unit and inc files search paths
GatherUnitsInSearchPaths(UnitPaths,IncludePaths,OnProgress,Units,Includes,true);
if (UnitPaths=nil) or (UnitPaths.Count=0) then begin
if (UnitPaths.Count=0) then begin
if CTConsoleVerbosity>=-1 then
debugln(['Warning: [TFPCTargetConfigCache.Update] no unit paths: ',Compiler,' ',ExtraOptions]);
end;