]> xenbits.xensource.com Git - libvirt.git/commitdiff
storage: Fix error path
authorJohn Ferlan <jferlan@redhat.com>
Tue, 19 Jul 2016 17:25:58 +0000 (13:25 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 20 Jul 2016 10:07:11 +0000 (06:07 -0400)
virStorageBackendCreateQemuImgCheckEncryption didn't return -1 if there
were no secrets.

src/storage/storage_backend.c

index 430dccfeee80fc3d4c817395bd3d70f2f7f9430f..6aa55939f19c2225b78653bb8181498be1546923 100644 (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,