storage: Fix error path

virStorageBackendCreateQemuImgCheckEncryption didn't return -1 if there
were no secrets.
This commit is contained in:
John Ferlan 2016-07-19 13:25:58 -04:00
parent 4f5debbeb4
commit 9301b46298

View File

@ -1063,6 +1063,7 @@ virStorageBackendCreateQemuImgCheckEncryption(int format,
if (enc->nsecrets == 0) {
virReportError(VIR_ERR_XML_ERROR, "%s",
_("no secret provided for luks encryption"));
return -1;
}
} else {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,