mirror of https://gitee.com/openkylin/libvirt.git
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:
parent
7118bdee15
commit
a13ac587bf
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue