Call xenDeamonClose if ping test fails during open call, to ensure any resources are freed up

This commit is contained in:
Daniel P. Berrange 2006-06-13 13:45:09 +00:00
parent 1213bedf6d
commit d9bfbfa949

View File

@ -1673,6 +1673,7 @@ xenDaemonOpen(virConnectPtr conn, const char *name, int flags)
/* A sort of "ping" to make sure the daemon is actually
alive & well, rather than just assuming it is */
if ((ret = xenDaemonGetVersion(conn, &version)) < 0) {
xenDaemonClose(conn);
return ret;
}