提交 1ee9c384 编写于 作者: M Marc Hartmayer 提交者: John Ferlan

test: fix error path in testConnectOpen

In case of an error do the cleanup of the private data of the
connection.
Signed-off-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com>
Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
上级 bc0f82ad
......@@ -1483,8 +1483,11 @@ testConnectOpen(virConnectPtr conn,
return ret;
/* Fake authentication. */
if (testConnectAuthenticate(conn, auth) < 0)
if (testConnectAuthenticate(conn, auth) < 0) {
testDriverCloseInternal(conn->privateData);
conn->privateData = NULL;
return VIR_DRV_OPEN_ERROR;
}
return VIR_DRV_OPEN_SUCCESS;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册