util: fix iteration in virSocketAddrResolveService

getaddrinfo returns linked list. Fix iteration accordingly.

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
Nikolay Shirokovskiy 2020-04-13 16:48:43 +03:00
parent 7118bdee15
commit a13ac587bf
1 changed files with 1 additions and 1 deletions

View File

@ -271,7 +271,7 @@ int virSocketAddrResolveService(const char *service)
port = ntohs(in.sin6_port);
goto cleanup;
}
tmp++;
tmp = tmp->ai_next;
}
virReportError(VIR_ERR_SYSTEM_ERROR,