diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 970efbb13c..3126cbb5b0 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -22911,10 +22911,10 @@ virDomainDiskSourceFormatInternal(virBufferPtr buf, * as we found it. */ if (src->encryption && src->encryptionInherited && virStorageEncryptionFormat(&childBuf, src->encryption) < 0) - return -1; + goto error; if (virDomainDiskSourceFormatPrivateData(&childBuf, src, flags, xmlopt) < 0) - return -1; + goto error; if (virXMLFormatElement(buf, "source", &attrBuf, &childBuf) < 0) goto error;