Fixed a possible NULL dereference.

This commit is contained in:
Armin Novak 2018-11-23 10:32:52 +01:00
parent 394bc62869
commit 5623a4761f

View File

@ -960,11 +960,12 @@ static int freerdp_tcp_connect_multi(rdpContext* context, char** hostnames,
for (index = 0; index < count; index++)
{
if (peers[index].s == INVALID_SOCKET)
continue;
sockfd = peers[index].s;
addr = peers[index].addr;
if ((sockfd == INVALID_SOCKET) || (!addr))
continue;
/* blocking tcp connect */
status = _connect(sockfd, addr->ai_addr, addr->ai_addrlen);