mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 07:59:00 +00:00
util: secret: remove cleanup labels
Signed-off-by: Barrett Schonefeld <bschoney@utexas.edu> Reviewed-by: Ján Tomko <jtomko@redhat.com> Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
2ef7602685
commit
b67080b345
@ -67,27 +67,26 @@ virSecretLookupParseSecret(xmlNodePtr secretnode,
|
||||
{
|
||||
g_autofree char *uuid = NULL;
|
||||
g_autofree char *usage = NULL;
|
||||
int ret = -1;
|
||||
|
||||
uuid = virXMLPropString(secretnode, "uuid");
|
||||
usage = virXMLPropString(secretnode, "usage");
|
||||
if (uuid == NULL && usage == NULL) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("missing secret uuid or usage attribute"));
|
||||
goto cleanup;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (uuid && usage) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("either secret uuid or usage expected"));
|
||||
goto cleanup;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (uuid) {
|
||||
if (virUUIDParse(uuid, def->u.uuid) < 0) {
|
||||
virReportError(VIR_ERR_XML_ERROR,
|
||||
_("invalid secret uuid '%s'"), uuid);
|
||||
goto cleanup;
|
||||
return -1;
|
||||
}
|
||||
def->type = VIR_SECRET_LOOKUP_TYPE_UUID;
|
||||
} else {
|
||||
@ -95,10 +94,7 @@ virSecretLookupParseSecret(xmlNodePtr secretnode,
|
||||
usage = NULL;
|
||||
def->type = VIR_SECRET_LOOKUP_TYPE_USAGE;
|
||||
}
|
||||
ret = 0;
|
||||
|
||||
cleanup:
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user