From 506b80c84e4556296ea7ac499c77b9f4ee87079f Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Thu, 15 Jun 2017 17:09:26 +0200 Subject: [PATCH] util: storage: Add missing return to virStorageSourceParseBackingJSONGluster If the number of servers is not expected the code would report an error but would not return failure. --- src/util/virstoragefile.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index 020c69def2..6b0af521f9 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -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) -- GitLab