* Fixed memory leak caused by FSocket not being freed if error during connect (bug ID 26959)

git-svn-id: trunk@30619 -
This commit is contained in:
michael 2015-04-17 13:35:41 +00:00
parent f5aeb96c97
commit f67cbabdc6

View File

@ -456,7 +456,12 @@ begin
Aport:=80;
G:=GetSocketHandler(UseSSL);
FSocket:=TInetSocket.Create(AHost,APort,G);
FSocket.Connect;
try
FSocket.Connect;
except
FreeAndNil(FSocket);
Raise;
end;
end;
procedure TFPCustomHTTPClient.DisconnectFromServer;