From: John Ferlan Date: Tue, 19 Jul 2016 17:25:58 +0000 (-0400) Subject: storage: Fix error path X-Git-Tag: v2.1.0-rc1~80 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9301b46298cba8a1b741249460da9effdf7a0375;p=thirdparty%2Flibvirt.git storage: Fix error path virStorageBackendCreateQemuImgCheckEncryption didn't return -1 if there were no secrets. --- diff --git a/src/storage/storage_backend.c b/src/storage/storage_backend.c index 430dccfeee..6aa55939f1 100644 --- a/src/storage/storage_backend.c +++ b/src/storage/storage_backend.c @@ -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,