From nobody Tue Feb 10 09:24:27 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1661175138; cv=none; d=zohomail.com; s=zohoarc; b=UvsgAuXDkKxgGy48KFvdxEW/JVgkSY5aUM6ZPz3apVulrKpX/GKnTGfpsC10GZ8i5eedr9Ky+1qkvae/iS9mKagh/0EBw8+tjlsDB7taRlxKFlHFPYnGXYix+O5jqvBldaZi5JfOT0prDDsXOmYhjwqP7XSvBfHSBeznQParb2E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1661175138; 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=XvQ4eAqN9b8FSOpesx1Ts2DtdADbl8KMxoWMmZqkRIM=; b=NhsrOKell68IcY22RklVcoejaZfewhFYCVKqOlnBf8QQrMDP9dBrGKAqXKY1Gkz8hQpveAIt/Fjht6GzTuIGtlopJQzQvtSMsyfIl16rLqntn5Cj2emiLAbtwihTZplV9qO3b3S2Aq3UVYWuwlCLniylTypRV5jeBbyAhw+VEUM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 16611751388701022.1959528878452; Mon, 22 Aug 2022 06:32:18 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-584-xFiToMPlPnOcwI8G12eadw-1; Mon, 22 Aug 2022 09:32:16 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BDEB1299E759; Mon, 22 Aug 2022 13:32:11 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id AC15A4010D42; Mon, 22 Aug 2022 13:32:11 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 83A201946A63; Mon, 22 Aug 2022 13:32:11 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id EAB551946A53 for ; Mon, 22 Aug 2022 13:31:51 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id B5B3040CFD0E; Mon, 22 Aug 2022 13:31:51 +0000 (UTC) Received: from vhost3.router.laine.org (unknown [10.2.16.254]) by smtp.corp.redhat.com (Postfix) with ESMTP id A187140CFD0A for ; Mon, 22 Aug 2022 13:31:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661175137; 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=XvQ4eAqN9b8FSOpesx1Ts2DtdADbl8KMxoWMmZqkRIM=; b=OjtVSiRFDECfAxvXMd5xfL1svBYZHcAhkVuoQxftLo4yuzEL++BEJa0EbzI1ckqyWaO7PP J4//g9Ia/vhF9EwlwYVAJasYxXRPmFw7ra4H9MIrzBtAj6ec4K8Lx/MB9YuwfJQ9GbHz39 FOmT7X7cNvTWN3eQDmapIIJJqpSO3vw= X-MC-Unique: xFiToMPlPnOcwI8G12eadw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 06/16] vbox: replace explicit virNetworkDefFree() with g_autoptr(virNetworkDef) Date: Mon, 22 Aug 2022 09:31:40 -0400 Message-Id: <20220822133150.1098794-7-laine@redhat.com> In-Reply-To: <20220822133150.1098794-1-laine@redhat.com> References: <20220822133150.1098794-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1661175139276100003 Content-Type: text/plain; charset="utf-8"; x-default="true" Signed-off-by: Laine Stump --- src/vbox/vbox_network.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/vbox/vbox_network.c b/src/vbox/vbox_network.c index f687ebbf1a..885fd48321 100644 --- a/src/vbox/vbox_network.c +++ b/src/vbox/vbox_network.c @@ -374,7 +374,7 @@ vboxNetworkDefineCreateXML(virConnectPtr conn, const ch= ar *xml, bool start, PRUnichar *networkNameUtf16 =3D NULL; char *networkNameUtf8 =3D NULL; IHostNetworkInterface *networkInterface =3D NULL; - virNetworkDef *def =3D NULL; + g_autoptr(virNetworkDef) def =3D NULL; virNetworkIPDef *ipdef =3D NULL; unsigned char uuid[VIR_UUID_BUFLEN]; vboxIID vboxnetiid; @@ -556,7 +556,6 @@ vboxNetworkDefineCreateXML(virConnectPtr conn, const ch= ar *xml, bool start, VBOX_UTF8_FREE(networkInterfaceNameUtf8); VBOX_UTF16_FREE(networkInterfaceNameUtf16); VBOX_RELEASE(host); - virNetworkDefFree(def); return ret; } =20 @@ -781,7 +780,7 @@ vboxSocketParseAddrUtf16(struct _vboxDriver *data, cons= t PRUnichar *utf16, static char *vboxNetworkGetXMLDesc(virNetworkPtr network, unsigned int fla= gs) { struct _vboxDriver *data =3D network->conn->privateData; - virNetworkDef *def =3D NULL; + g_autoptr(virNetworkDef) def =3D NULL; virNetworkIPDef *ipdef =3D NULL; char *networkNameUtf8 =3D NULL; PRUnichar *networkInterfaceNameUtf16 =3D NULL; @@ -926,7 +925,6 @@ static char *vboxNetworkGetXMLDesc(virNetworkPtr networ= k, unsigned int flags) VBOX_RELEASE(networkInterface); VBOX_UTF16_FREE(networkInterfaceNameUtf16); VBOX_RELEASE(host); - virNetworkDefFree(def); VIR_FREE(networkNameUtf8); VBOX_RELEASE(dhcpServer); return ret; --=20 2.37.1