render / rpms / libvirt

Forked from rpms/libvirt 11 months ago
Clone
6ae9ed
From d6d438826f7f60dcef0307fdfcf919fe8cc28aef Mon Sep 17 00:00:00 2001
6ae9ed
Message-Id: <d6d438826f7f60dcef0307fdfcf919fe8cc28aef@dist-git>
6ae9ed
From: John Ferlan <jferlan@redhat.com>
6ae9ed
Date: Mon, 25 Jul 2016 12:43:03 -0400
6ae9ed
Subject: [PATCH] storage: Fix error path
6ae9ed
6ae9ed
https://bugzilla.redhat.com/show_bug.cgi?id=1301021
6ae9ed
6ae9ed
virStorageBackendCreateQemuImgCheckEncryption didn't return -1 if there
6ae9ed
were no secrets.
6ae9ed
6ae9ed
(cherry picked from commit 9301b46298cba8a1b741249460da9effdf7a0375)
6ae9ed
Signed-off-by: John Ferlan <jferlan@redhat.com>
6ae9ed
---
6ae9ed
 src/storage/storage_backend.c | 1 +
6ae9ed
 1 file changed, 1 insertion(+)
6ae9ed
6ae9ed
diff --git a/src/storage/storage_backend.c b/src/storage/storage_backend.c
6ae9ed
index 84ef4f2..d0eaaf9 100644
6ae9ed
--- a/src/storage/storage_backend.c
6ae9ed
+++ b/src/storage/storage_backend.c
6ae9ed
@@ -1063,6 +1063,7 @@ virStorageBackendCreateQemuImgCheckEncryption(int format,
6ae9ed
         if (enc->nsecrets == 0) {
6ae9ed
             virReportError(VIR_ERR_XML_ERROR, "%s",
6ae9ed
                            _("no secret provided for luks encryption"));
6ae9ed
+            return -1;
6ae9ed
         }
6ae9ed
     } else {
6ae9ed
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
6ae9ed
-- 
6ae9ed
2.9.2
6ae9ed