Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/conf/domain_conf.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 6124c7520c..7cf555596f 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -31339,9 +31339,7 @@ virDomainDiskAddISCSIPoolSourceHost(virDomainDiskDefPtr def, /* iscsi pool only supports one host */ def->src->nhosts = 1; - - if (VIR_ALLOC_N(def->src->hosts, def->src->nhosts) < 0) - goto cleanup; + def->src->hosts = g_new0(virStorageNetHostDef, 1); def->src->hosts[0].name = g_strdup(pooldef->source.hosts[0].name); -- 2.24.1