From nobody Tue Feb 10 01:16:11 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1570111817; cv=none; d=zoho.com; s=zohoarc; b=NZ2Gr9m9mx8KmmrhzfwsAEFuVY44j3OIPEdaOhfM+bAR2Dj3XbdMNf1LtNKTcH9MGlCIxGKTfB1oeRolJO3cPjoRUo8qHxzswdhwKBGSXo6SWhFOWDSy7/tyWImEDM074uPDVNKh7TBmxCIrW6x7FHapdv1SfqNR7IkONCfhsyQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1570111817; 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:ARC-Authentication-Results; bh=HZVmgZ5OO52cmCjDNITogbZg8Ny3ir3AFL1EEHCv38c=; b=St9aLXkp88kD7hjIEoNnEWJKbA0qRpc3BvmiHtg647OIaGZPFcA8Y+r10r3pMjF7xmrUqF33tXTo4VlOBSGh7ocy/A5XkewCrtljuLH8sB7KGdhqFb2AdTeVqEksOJxJzVA6jw35XOZlWVVSQv2YzBlIBygGEP6z7ClnFZpg4D0= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 157011181799441.46611533101873; Thu, 3 Oct 2019 07:10:17 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id DDB5910CC207; Thu, 3 Oct 2019 14:10:15 +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 AC5C34513; Thu, 3 Oct 2019 14:10:15 +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 551BD2551B; Thu, 3 Oct 2019 14:10:15 +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 x93E5ppT021092 for ; Thu, 3 Oct 2019 10:05:51 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4CB795D717; Thu, 3 Oct 2019 14:05:51 +0000 (UTC) Received: from virval.usersys.redhat.com (unknown [10.43.2.188]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 21F7C5D784 for ; Thu, 3 Oct 2019 14:05:48 +0000 (UTC) Received: by virval.usersys.redhat.com (Postfix, from userid 500) id 597361005D9; Thu, 3 Oct 2019 16:05:43 +0200 (CEST) From: Jiri Denemark To: libvir-list@redhat.com Date: Thu, 3 Oct 2019 16:00:24 +0200 Message-Id: <1731d7154526eb959be8868caf4f8cb64efa7ad8.1570111135.git.jdenemar@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 Subject: [libvirt] [PATCH 06/22] qemu: Use VIR_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: , Content-Transfer-Encoding: quoted-printable 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-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.65]); Thu, 03 Oct 2019 14:10:17 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark Reviewed-by: J=C3=A1n Tomko --- 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 aa6074bc02..720cd78a23 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -5527,8 +5527,8 @@ qemuMonitorJSONGetCPUDefinitions(qemuMonitorPtr mon, qemuMonitorCPUDefInfoPtr **cpus) { int ret =3D -1; - virJSONValuePtr cmd; - virJSONValuePtr reply =3D NULL; + VIR_AUTOPTR(virJSONValue) cmd =3D NULL; + VIR_AUTOPTR(virJSONValue) reply =3D NULL; virJSONValuePtr data; qemuMonitorCPUDefInfoPtr *cpulist =3D NULL; size_t n =3D 0; @@ -5630,8 +5630,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