mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
util: storageencryption: 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
f3522af454
commit
2ef7602685
@ -176,13 +176,12 @@ static int
|
|||||||
virStorageEncryptionInfoParseCipher(xmlNodePtr info_node,
|
virStorageEncryptionInfoParseCipher(xmlNodePtr info_node,
|
||||||
virStorageEncryptionInfoDefPtr info)
|
virStorageEncryptionInfoDefPtr info)
|
||||||
{
|
{
|
||||||
int ret = -1;
|
|
||||||
g_autofree char *size_str = NULL;
|
g_autofree char *size_str = NULL;
|
||||||
|
|
||||||
if (!(info->cipher_name = virXMLPropString(info_node, "name"))) {
|
if (!(info->cipher_name = virXMLPropString(info_node, "name"))) {
|
||||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||||
_("cipher info missing 'name' attribute"));
|
_("cipher info missing 'name' attribute"));
|
||||||
goto cleanup;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((size_str = virXMLPropString(info_node, "size")) &&
|
if ((size_str = virXMLPropString(info_node, "size")) &&
|
||||||
@ -190,22 +189,19 @@ virStorageEncryptionInfoParseCipher(xmlNodePtr info_node,
|
|||||||
virReportError(VIR_ERR_XML_ERROR,
|
virReportError(VIR_ERR_XML_ERROR,
|
||||||
_("cannot parse cipher size: '%s'"),
|
_("cannot parse cipher size: '%s'"),
|
||||||
size_str);
|
size_str);
|
||||||
goto cleanup;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!size_str) {
|
if (!size_str) {
|
||||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||||
_("cipher info missing 'size' attribute"));
|
_("cipher info missing 'size' attribute"));
|
||||||
goto cleanup;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
info->cipher_mode = virXMLPropString(info_node, "mode");
|
info->cipher_mode = virXMLPropString(info_node, "mode");
|
||||||
info->cipher_hash = virXMLPropString(info_node, "hash");
|
info->cipher_hash = virXMLPropString(info_node, "hash");
|
||||||
|
|
||||||
ret = 0;
|
return 0;
|
||||||
|
|
||||||
cleanup:
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user