From nobody Sun Feb 8 12:20:03 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.120 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=1572960512; cv=none; d=zoho.com; s=zohoarc; b=n0m17ny16++brxJy8rGYxTLllq1vtriADipAsUyh3lLq2GOndmDmBt1rZ2yYVovC9CesDnXBrCkrE+TrPYzD2pM3XO+/R5ZgZgj85NzEDm1GYjd8UYjEQmSHF5JihJzLrlcOCX1fpqBU7v0pR/w8gIQo0D5RrXz5nuVbbQ50HgI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572960512; 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=eUhRsh0vZX8nNeobLpUbrBe9UIt/CCfkUpc2UBXgugQ=; b=OkoE/eEDhZekaLwJEfmS7AbjHiEP4X9+JAe8Mr20u5gXhCSKbJ5LQVQLqwmRCmISBhITuFWuCU3dFqF4Iokpe7O66pFBvKldKoyfsinGtYGwMetNT+wwggfeZ4w0XhSBmKGEk4t1oisWyQKdcDucu9ZVLojWInb7QENYZNPbyiI= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.120 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-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1572960512535766.9685544990826; Tue, 5 Nov 2019 05:28:32 -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-33-ertUkbCJP1KuCwB5LwIgYg-1; Tue, 05 Nov 2019 08:28:29 -0500 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 51A25107ACC5; Tue, 5 Nov 2019 13:28:24 +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 292262706B; Tue, 5 Nov 2019 13:28:24 +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 CD8604E562; Tue, 5 Nov 2019 13:28:23 +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 xA5DRv8R003880 for ; Tue, 5 Nov 2019 08:27:57 -0500 Received: by smtp.corp.redhat.com (Postfix) id BF4CD5D726; Tue, 5 Nov 2019 13:27:57 +0000 (UTC) Received: from virval.usersys.redhat.com (unknown [10.43.2.188]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 949C15D727 for ; Tue, 5 Nov 2019 13:27:57 +0000 (UTC) Received: by virval.usersys.redhat.com (Postfix, from userid 500) id 79B3D105B25; Tue, 5 Nov 2019 14:27:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572960511; 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=eUhRsh0vZX8nNeobLpUbrBe9UIt/CCfkUpc2UBXgugQ=; b=fnglK6QhCEKDKqZ8hbIEQyOHYUPE6Z9tEOYKInnzeY7rVHNJSqfkzCbK8v6eQpGgqzAVZc MGrK7+R7YhCmQKjbrjU+WCCXTv9/zjbqlEJYU1UF122QnefcB3ZdHpkvBjhutpYtyrvuj1 PQz38a8cjKt6LOcy8h18MKUlvBsg42s= From: Jiri Denemark To: libvir-list@redhat.com Date: Tue, 5 Nov 2019 14:27:06 +0100 Message-Id: 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 Subject: [libvirt] [PATCH v3 08/52] qemu: Use g_autoptr in qemuMonitorJSONGetCPUDefinitions 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 X-MC-Unique: ertUkbCJP1KuCwB5LwIgYg-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark Reviewed-by: J=C3=A1n Tomko --- Notes: Version 2: - no change =20 Version 3: - g_autoptr src/qemu/qemu_monitor_json.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index f4794b2a43..c330026692 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -5578,8 +5578,8 @@ qemuMonitorJSONGetCPUDefinitions(qemuMonitorPtr mon, qemuMonitorCPUDefInfoPtr **cpus) { int ret =3D -1; - virJSONValuePtr cmd; - virJSONValuePtr reply =3D NULL; + g_autoptr(virJSONValue) cmd =3D NULL; + g_autoptr(virJSONValue) reply =3D NULL; virJSONValuePtr data; qemuMonitorCPUDefInfoPtr *cpulist =3D NULL; size_t n =3D 0; @@ -5679,8 +5679,6 @@ qemuMonitorJSONGetCPUDefinitions(qemuMonitorPtr mon, qemuMonitorCPUDefInfoFree(cpulist[i]); VIR_FREE(cpulist); } - virJSONValueFree(cmd); - virJSONValueFree(reply); return ret; } =20 --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list