diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend_fs.c index 5e3da14963e87fa840e1a1418e6cabb17ed42227..5eb486ef700655333f89f700a1cbe79aea6b2253 100644 --- a/src/storage/storage_backend_fs.c +++ b/src/storage/storage_backend_fs.c @@ -205,11 +205,11 @@ virStorageBackendFileSystemNetFindPoolSourcesFunc(virStoragePoolObjPtr pool ATTR if (!(src = virStoragePoolSourceListNewSource(&state->list))) goto cleanup; - if (src->nhost != 1) { - virStorageReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("Expected exactly 1 host for the storage pool")); + if (VIR_ALLOC_N(src->hosts, 1) < 0) { + virReportOOMError(); goto cleanup; } + src->nhost = 1; if (!(src->hosts[0].name = strdup(state->host)) || !(src->dir = strdup(path))) {