remote: Avoid calling virAuthConfigLookup() if 'credname' is NULL.

This commit is contained in:
John Ferlan 2013-01-07 12:09:31 -05:00 committed by Eric Blake
parent 185478af09
commit 2e0e1a91f7

View File

@ -3738,7 +3738,8 @@ static int remoteAuthFillFromConfig(virConnectPtr conn,
break;
}
if (virAuthConfigLookup(state->config,
if (credname &&
virAuthConfigLookup(state->config,
"libvirt",
VIR_URI_SERVER(conn->uri),
credname,