libvirt.c: remove unneeded cleanup label

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Daniel Henrique Barboza 2019-10-21 15:19:05 -03:00 committed by Ján Tomko
parent 93af79fba3
commit e19f6cb7f2

View File

@ -796,22 +796,19 @@ static int
virConnectGetDefaultURI(virConfPtr conf,
char **name)
{
int ret = -1;
const char *defname = getenv("LIBVIRT_DEFAULT_URI");
if (defname && *defname) {
VIR_DEBUG("Using LIBVIRT_DEFAULT_URI '%s'", defname);
*name = g_strdup(defname);
} else {
if (virConfGetValueString(conf, "uri_default", name) < 0)
goto cleanup;
return -1;
if (*name)
VIR_DEBUG("Using config file uri '%s'", *name);
}
ret = 0;
cleanup:
return ret;
return 0;
}