]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
util: storage: Add missing return to virStorageSourceParseBackingJSONGluster
authorPeter Krempa <pkrempa@redhat.com>
Thu, 15 Jun 2017 15:09:26 +0000 (17:09 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 19 Jun 2017 13:50:29 +0000 (15:50 +0200)
If the number of servers is not expected the code would report an error
but would not return failure.

src/util/virstoragefile.c

index 020c69def2fc9e30dc1a90c26519baf120a82c01..6b0af521f9162aecd190fbb265ca1bfebbe661c8 100644 (file)
@@ -2888,6 +2888,8 @@ virStorageSourceParseBackingJSONGluster(virStorageSourcePtr src,
         virReportError(VIR_ERR_INVALID_ARG, "%s",
                        _("at least 1 server is necessary in "
                          "JSON backing definition for gluster volume"));
+
+        return -1;
     }
 
     if (VIR_ALLOC_N(src->hosts, nservers) < 0)