From: Barrett Schonefeld <bschoney@xxxxxxxxxx> - src/util/virsecret.c Signed-off-by: Barrett Schonefeld <bschoney@xxxxxxxxxx> --- src/util/virsecret.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/util/virsecret.c b/src/util/virsecret.c index 78a3b41bc5..9ed803d45b 100644 --- a/src/util/virsecret.c +++ b/src/util/virsecret.c @@ -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; } -- 2.29.0