From nobody Mon Feb 9 01:19:54 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=1629470965; cv=none; d=zohomail.com; s=zohoarc; b=I264ZBQLxGqArpM/BD/phTNZE1xJXfYClKnzO/Xmj4JavyJ21zGVrL/eqEqYY9xuxg/cNRH4mL5iuwxAh7M6M8aQr38Mnr1BjEt5wyoKrULKHxivM1E6Xdsp8mhD3ElEuDN8YRzBA2N5TavPgI+tCpvTmiH1CUcFosI+J2+lDuM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629470965; 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=9b63E6Mc/MrK+LspLzxzbz31CMzkd3YvAI0dftIYmEs=; b=n1Ub81Yw1wR0gZsnsRK/eUiDzjiNVaUeKIOo3D41x2xuSxcb1A1YxrhXKrf0o4+5kc5XzzvuVcYJaKAONc2AymcQzuSgzzfj9bF6VOKog4rX/51tnQZaG+m8wc0k/dXSbfHtcxxr6W/Quw3nVTEKHrlvJyRXoPNdiYmrdVo+JnQ= 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) 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 1629470965783778.8767304970839; Fri, 20 Aug 2021 07:49:25 -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-561-GkGrmPVoNCmxCtmVV1c8rA-1; Fri, 20 Aug 2021 10:49:23 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2F6871B2C98B; Fri, 20 Aug 2021 14:49:18 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0DD9C5DD68; Fri, 20 Aug 2021 14:49:18 +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 CF934181A1CD; Fri, 20 Aug 2021 14:49:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 17KEn1Yb025523 for ; Fri, 20 Aug 2021 10:49:01 -0400 Received: by smtp.corp.redhat.com (Postfix) id 157AE5D741; Fri, 20 Aug 2021 14:49:01 +0000 (UTC) Received: from hjs.redhat.com (unknown [10.43.2.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id 928856B55E for ; Fri, 20 Aug 2021 14:49:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1629470964; 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=9b63E6Mc/MrK+LspLzxzbz31CMzkd3YvAI0dftIYmEs=; b=EpKkxGDibCs1M5kqKjBMhxmrK3TNWAqcrs9azBudMJLnusoqZ9yi7if7RukF1y8ldIgeuh 78Hk+cLuz/H3j4pIDGfe8aBnCBPJykVUfr9LigIzDnFEJxQShczFwNRDd/nPbiktYVfpmg v0bqXuQG65PXm0AOaLw3DNifNWHbn7I= X-MC-Unique: GkGrmPVoNCmxCtmVV1c8rA-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 3/9] tests: cputest: use g_auto for virQEMUCaps Date: Fri, 20 Aug 2021 16:48:45 +0200 Message-Id: <7c87b472cfecd007b9f9b7f5d4e9dded4ca5cf99.1629470763.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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.14 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1629471086537100001 Signed-off-by: J=C3=A1n Tomko --- tests/cputest.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/tests/cputest.c b/tests/cputest.c index a87aaa64d0..78521a5cf9 100644 --- a/tests/cputest.c +++ b/tests/cputest.c @@ -514,7 +514,7 @@ static int cpuTestGetCPUModels(const struct data *data, virDomainCapsCPUModels **models) { - virQEMUCaps *qemuCaps; + g_autoptr(virQEMUCaps) qemuCaps =3D NULL; =20 *models =3D NULL; =20 @@ -527,8 +527,6 @@ cpuTestGetCPUModels(const struct data *data, =20 *models =3D virQEMUCapsGetCPUModels(qemuCaps, VIR_DOMAIN_VIRT_KVM, NUL= L, NULL); =20 - virObjectUnref(qemuCaps); - return 0; } =20 @@ -861,7 +859,7 @@ static int cpuTestJSONCPUID(const void *arg) { const struct data *data =3D arg; - virQEMUCaps *qemuCaps =3D NULL; + g_autoptr(virQEMUCaps) qemuCaps =3D NULL; virCPUDef *cpu =3D NULL; char *result =3D NULL; int ret =3D -1; @@ -883,7 +881,6 @@ cpuTestJSONCPUID(const void *arg) ret =3D cpuTestCompareXML(data->arch, cpu, result); =20 cleanup: - virObjectUnref(qemuCaps); virCPUDefFree(cpu); VIR_FREE(result); return ret; @@ -894,7 +891,7 @@ static int cpuTestJSONSignature(const void *arg) { const struct data *data =3D arg; - virQEMUCaps *qemuCaps =3D NULL; + g_autoptr(virQEMUCaps) qemuCaps =3D NULL; virCPUData *hostData =3D NULL; qemuMonitorCPUModelInfo *modelInfo; int ret =3D -1; @@ -909,7 +906,6 @@ cpuTestJSONSignature(const void *arg) ret =3D cpuTestCompareSignature(data, hostData); =20 cleanup: - virObjectUnref(qemuCaps); virCPUDataFree(hostData); return ret; } --=20 2.31.1