提交 97f4a104 编写于 作者: M Marcos Paulo de Souza 提交者: Michal Privoznik

xenapi: Drop check for auth

Since they are done inside virAuthGetPassword and virAuthGetUsername
when needed. Also, only auth is checked, but auth->cb, which that could
lead to a crash if the callback is NULL.
Signed-off-by: NMarcos Paulo de Souza <marcos.souza.org@gmail.com>
上级 93db97ee
...@@ -152,12 +152,6 @@ xenapiConnectOpen(virConnectPtr conn, virConnectAuthPtr auth, ...@@ -152,12 +152,6 @@ xenapiConnectOpen(virConnectPtr conn, virConnectAuthPtr auth,
goto error; goto error;
} }
if (auth == NULL) {
xenapiSessionErrorHandler(conn, VIR_ERR_AUTH_FAILED,
_("Authentication Credentials not found"));
goto error;
}
if (conn->uri->user != NULL) { if (conn->uri->user != NULL) {
if (VIR_STRDUP(username, conn->uri->user) < 0) if (VIR_STRDUP(username, conn->uri->user) < 0)
goto error; goto error;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册