Signed-off-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
ssize_t i;
char *username = NULL, *password = NULL;
- if (privconn->numAuths == 0)
+ testDriverLock(privconn);
+ if (privconn->numAuths == 0) {
+ testDriverUnlock(privconn);
return 0;
+ }
/* Authentication is required because the test XML contains a
* non-empty <auth/> section. First we must ask for a username.
ret = 0;
cleanup:
+ testDriverUnlock(privconn);
VIR_FREE(username);
VIR_FREE(password);
return ret;