From nobody Mon Feb 9 19:30:36 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1580910112637641.0118643517532; Wed, 5 Feb 2020 05:41:52 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-39-DfwQp8OIOVGSyJiiqDFjzQ-1; Wed, 05 Feb 2020 08:41:49 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BC056DB65; Wed, 5 Feb 2020 13:41:43 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9F7CE857BA; Wed, 5 Feb 2020 13:41:42 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 8132781744; Wed, 5 Feb 2020 13:41:39 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 015Df6cI008394 for ; Wed, 5 Feb 2020 08:41:06 -0500 Received: by smtp.corp.redhat.com (Postfix) id 6250B10018FF; Wed, 5 Feb 2020 13:41:06 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id E00211001B05 for ; Wed, 5 Feb 2020 13:41:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580910111; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=b0XdnmPXrEgAHo2B/jGHlRUCfGH23ztEPMpP5pKi83A=; b=GUx8BD73ehMCHhDXKdmV0aDGC7PVR3lgN8vDtbL89p5iaQvMN9hzh8MhPj0HMZtuPjltIJ fDtj0KT+UiznKk2d3VZvNJyzqp7WgHDEDBlnMA+2EZdINBdOa0qr0kJePHmQMJDuah16xK CIzY9NdLSl/2AbJG4DLahTk5D1CsA94= From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 2/9] virDomainDiskAddISCSIPoolSourceHost: use g_new0 instead of VIR_ALLOC_N Date: Wed, 5 Feb 2020 14:40:53 +0100 Message-Id: <7bf09aeb1fba0e4ca0911c4602ad39e19eeb28de.1580909976.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: DfwQp8OIOVGSyJiiqDFjzQ-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- 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(virDomainDiskDe= fPtr def, /* iscsi pool only supports one host */ def->src->nhosts =3D 1; - - if (VIR_ALLOC_N(def->src->hosts, def->src->nhosts) < 0) - goto cleanup; + def->src->hosts =3D g_new0(virStorageNetHostDef, 1); def->src->hosts[0].name =3D g_strdup(pooldef->source.hosts[0].name); --=20 2.24.1