From nobody Mon Feb 9 07:26:58 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1601624710; cv=none; d=zohomail.com; s=zohoarc; b=UmWc+qpbCTsu1JbmxJ/mpx8Q2WYWAmLDVdqN1RhSArdKJdlkQrtxrKy09IFQe+gQ4hVkYJAf3YBtshRCt18ndGCyNBOy/yVdvJNqTlYtQVI+uGbcP8nWC2r0aKRAMeW43+vNOy+JwDEx4FwH8BjdzncDRuQ1EMlkXpX32KPTTjo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601624710; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=tVC1JoMLxjPaPOnbAD0ckwHjwLTfnROW2iIaPi0M3cw=; b=JjW11ChYs2ltsMcHc/qwrdfU5k1UnNZ5ykPR9upD0bGYk6ISyzcFZcI2cD04jKsT7cT5UEEsfQIpwX7wILfA3V8OKXgDHf/cgE4Q+aJXQBqtTHAUTB4jMVNFMnm6H4a6xhsy4lCksebtRiQ6nv4W8n/H2HLWRhtLgvTYidCsnqM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1601624710609824.9889417915857; Fri, 2 Oct 2020 00:45:10 -0700 (PDT) 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-158-CUIYt2GBMGCnmoBcJ4PaJQ-1; Fri, 02 Oct 2020 03:43:52 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 36531188C122; Fri, 2 Oct 2020 07:43:47 +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 AFB5019936; Fri, 2 Oct 2020 07:43:46 +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 7E9C044A5F; Fri, 2 Oct 2020 07:43:46 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0927hUgP004301 for ; Fri, 2 Oct 2020 03:43:30 -0400 Received: by smtp.corp.redhat.com (Postfix) id 63BF719931; Fri, 2 Oct 2020 07:43:30 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.55]) by smtp.corp.redhat.com (Postfix) with ESMTP id B1DFB1992F for ; Fri, 2 Oct 2020 07:43:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601624709; 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=tVC1JoMLxjPaPOnbAD0ckwHjwLTfnROW2iIaPi0M3cw=; b=VQLPjiHBBEMTAN8rBJm0k0N0Sksz5pjMNcJl68T0GZdkkeMtqqrM5bPDgM013y04mLWagi HJGW7DNTfJNQ1T/u1O3vZOlHbblBv7pGbtGcGEPNZKfJgKDiqhqFNen1XIINbdiMdXTYNu Ux/8b/XdRmls8g+gGCnw/ccegR5PkTI= X-MC-Unique: CUIYt2GBMGCnmoBcJ4PaJQ-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 14/15] qemuSlirpNew: Use g_new0 to allocate the slirp object Date: Fri, 2 Oct 2020 09:43:08 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com 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/qemu/qemu_slirp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_slirp.c b/src/qemu/qemu_slirp.c index 3efc34bcf0..d9105b0ff6 100644 --- a/src/qemu/qemu_slirp.c +++ b/src/qemu/qemu_slirp.c @@ -81,10 +81,9 @@ qemuSlirpHasFeature(const qemuSlirp *slirp, qemuSlirpPtr qemuSlirpNew(void) { - g_autoptr(qemuSlirp) slirp =3D NULL; + g_autoptr(qemuSlirp) slirp =3D g_new0(qemuSlirp, 1); - if (VIR_ALLOC(slirp) < 0 || - !(slirp->features =3D virBitmapNew(QEMU_SLIRP_FEATURE_LAST))) + if (!(slirp->features =3D virBitmapNew(QEMU_SLIRP_FEATURE_LAST))) return NULL; slirp->pid =3D (pid_t)-1; --=20 2.26.2