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.
This commit is contained in:
Peter Krempa 2017-06-15 17:09:26 +02:00
parent 236e1f7e8c
commit 506b80c84e

View File

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