From nobody Mon Feb 9 18:19:47 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=1661175126; cv=none; d=zohomail.com; s=zohoarc; b=Tbgtp6mKe9gMg7Me1wZUS/9HAINTBCOnwFqLtZT4ksTOAN9yUwa4ldY+z7xy/UYTOG5IBha3E6VecA0Nd4xPb2Nibw7lBP/EAxZ46im4qKNkEeRwyxXZbfNHZ1q8LEc2qIBEyjbkvWFor2LexBQl1hUvedE/mXZw3ncQaZDk/lw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1661175126; 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=y7rx5xHZ2dGSaHqG6aYB86g8bpMWXlfCxNWLk1ug9MM=; b=MF7mZ0+WmWrM/NDf4rVB/CK0OCIb5z60vucvYPKIADmgSn29NesPmjYQykGhReRwTydxNsjlbcGz1NkEdqgtg3yYn3lS3qoxr90R1iWTp9XnYCfOlpyIVhthawV9yqI5cUMv23CHdsz62kHYQNyf/0Ui6pP0730ZmWeJLphumvw= 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 1661175126459751.2746410604649; Mon, 22 Aug 2022 06:32:06 -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-502-NhO1axkCOJqL-X27uFy3kA-1; Mon, 22 Aug 2022 09:32:00 -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 236A6299E745; Mon, 22 Aug 2022 13:31:56 +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 0E68E4010D42; Mon, 22 Aug 2022 13:31:56 +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 478F01946A48; Mon, 22 Aug 2022 13:31:55 +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 C65261946A4B for ; Mon, 22 Aug 2022 13:31:51 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 95B2740CFD0B; 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 812D740CFD0A 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=1661175125; 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=y7rx5xHZ2dGSaHqG6aYB86g8bpMWXlfCxNWLk1ug9MM=; b=Qc1r+gwMI4BBlIRzD5cNdWkGpmoXWpQc742zFZxMGhT+Y7lg5pDrncOYwxdCPDIRBsULUX U8kT/JmL+oyOMNwUeJPHgABkcWMBcuouepg+pJI8yyZpzrQ7HgEyuayWfO1PA8qOs0tYiY gWBxKMEaUasXtFBmf5VMukuptNaUiyo= X-MC-Unique: NhO1axkCOJqL-X27uFy3kA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 05/16] test driver: replace explicit virNetworkDefFree() with g_autoptr(virNetworkDef) Date: Mon, 22 Aug 2022 09:31:39 -0400 Message-Id: <20220822133150.1098794-6-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: 1661175127101100005 Content-Type: text/plain; charset="utf-8"; x-default="true" Signed-off-by: Laine Stump --- src/test/test_driver.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 24ff6e8967..641a141b6a 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -5561,7 +5561,7 @@ testNetworkCreateXMLFlags(virConnectPtr conn, const c= har *xml, unsigned int flags) { testDriver *privconn =3D conn->privateData; - virNetworkDef *newDef; + g_autoptr(virNetworkDef) newDef =3D NULL; virNetworkObj *obj =3D NULL; virNetworkDef *def; virNetworkPtr net =3D NULL; @@ -5588,7 +5588,6 @@ testNetworkCreateXMLFlags(virConnectPtr conn, const c= har *xml, net =3D virGetNetwork(conn, def->name, def->uuid); =20 cleanup: - virNetworkDefFree(newDef); virObjectEventStateQueue(privconn->eventState, event); virNetworkObjEndAPI(&obj); return net; @@ -5608,7 +5607,7 @@ testNetworkDefineXMLFlags(virConnectPtr conn, unsigned int flags) { testDriver *privconn =3D conn->privateData; - virNetworkDef *newDef; + g_autoptr(virNetworkDef) newDef =3D NULL; virNetworkObj *obj =3D NULL; virNetworkDef *def; virNetworkPtr net =3D NULL; @@ -5632,7 +5631,6 @@ testNetworkDefineXMLFlags(virConnectPtr conn, net =3D virGetNetwork(conn, def->name, def->uuid); =20 cleanup: - virNetworkDefFree(newDef); virObjectEventStateQueue(privconn->eventState, event); virNetworkObjEndAPI(&obj); return net; --=20 2.37.1