提交 a13ac587 编写于 作者: N Nikolay Shirokovskiy

util: fix iteration in virSocketAddrResolveService

getaddrinfo returns linked list. Fix iteration accordingly.
Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
上级 7118bdee
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册