Blame SOURCES/libvirt-util-storage-Add-missing-return-to-virStorageSourceParseBackingJSONGluster.patch

3e5111
From 90864415eb0d8e1942bdb879035941909dc0a191 Mon Sep 17 00:00:00 2001
3e5111
Message-Id: <90864415eb0d8e1942bdb879035941909dc0a191@dist-git>
3e5111
From: Peter Krempa <pkrempa@redhat.com>
3e5111
Date: Tue, 20 Jun 2017 10:22:36 +0200
3e5111
Subject: [PATCH] util: storage: Add missing return to
3e5111
 virStorageSourceParseBackingJSONGluster
3e5111
3e5111
If the number of servers is not expected the code would report an error
3e5111
but would not return failure.
3e5111
3e5111
(cherry picked from commit 506b80c84e4556296ea7ac499c77b9f4ee87079f)
3e5111
3e5111
https://bugzilla.redhat.com/show_bug.cgi?id=1461638
3e5111
3e5111
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
3e5111
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
3e5111
---
3e5111
 src/util/virstoragefile.c | 2 ++
3e5111
 1 file changed, 2 insertions(+)
3e5111
3e5111
diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c
3e5111
index 6427c2b24a..c86cd2fc0a 100644
3e5111
--- a/src/util/virstoragefile.c
3e5111
+++ b/src/util/virstoragefile.c
3e5111
@@ -2893,6 +2893,8 @@ virStorageSourceParseBackingJSONGluster(virStorageSourcePtr src,
3e5111
         virReportError(VIR_ERR_INVALID_ARG, "%s",
3e5111
                        _("at least 1 server is necessary in "
3e5111
                          "JSON backing definition for gluster volume"));
3e5111
+
3e5111
+        return -1;
3e5111
     }
3e5111
 
3e5111
     if (VIR_ALLOC_N(src->hosts, nservers) < 0)
3e5111
-- 
3e5111
2.13.1
3e5111