From nobody Sat Feb 7 15:15:24 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; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1569865726; cv=none; d=zoho.com; s=zohoarc; b=XBev0DOIyXLQZ59TCCPnuP9UqJpQX1hHRYSGx8hFERRXWbie4SdVtdq+dX2EqSn9YedWtfFVZOhgLodsvBzNJskMjnXUuoQNNHNNeatx919lyvPOHnRjwoWmaIv1pdPd1BumTnb5w0xdyCyjPhE0mVc/MLdgTIb1UoY7H18H47g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569865726; h=Content-Type:Content-Transfer-Encoding:Cc: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=hGXa38npIGhwAmR02OX8K83WAIbDxiqNorFUq+8Hlzs=; b=cF9DWPVRqoajO7uVesKBHPQ0YeHG/IhveOBPU2MvumSVgqp9XUZp1vDVaC1eEpSBotL9upSYF+8B6Twkq7jsQUQdUWqg77Ql0GmMYv8Vlqgq1nD7fyK9jKCfNdy1KF2FoL3qNP+d23vgn6LXe6xl25WcgrO8L/ow3F+XCVeO068= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail 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 1569865726852316.67869386741813; Mon, 30 Sep 2019 10:48:46 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4166310CC1F9; Mon, 30 Sep 2019 17:48:45 +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 16FBF60FA2; Mon, 30 Sep 2019 17:48:45 +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 D10F44EE73; Mon, 30 Sep 2019 17:48:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x8UHmTlR029264 for ; Mon, 30 Sep 2019 13:48:29 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8B15A19C6A; Mon, 30 Sep 2019 17:48:29 +0000 (UTC) Received: from mx1.redhat.com (ext-mx25.extmail.prod.ext.phx2.redhat.com [10.5.110.66]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 833B019C58; Mon, 30 Sep 2019 17:48:29 +0000 (UTC) Received: from mail-qk1-f193.google.com (mail-qk1-f193.google.com [209.85.222.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6866D10C093C; Mon, 30 Sep 2019 17:48:28 +0000 (UTC) Received: by mail-qk1-f193.google.com with SMTP id u22so8559980qkk.11; Mon, 30 Sep 2019 10:48:28 -0700 (PDT) Received: from rekt.ibmuc.com ([2804:431:c7c6:2a15:38ab:f72b:e1c1:67e7]) by smtp.gmail.com with ESMTPSA id v26sm10204538qta.88.2019.09.30.10.48.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 10:48:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nmXy6Xne5l1JtsQtL9PITABkluWOMyiXrP5BxMdUyCI=; b=rLVldw3Yc6X92BwZi4IBpo4jCNH/de5e4/D/l+4v18qw3J3JveGJND7LqRAX0J7tgq EvSx5uGoZ1AeB1jgh09jK01u6hD9DgXRmchB0XFBC8XUnpbsE6dBWrokbI2PZpyWwGxQ ogTesmmQpNSLs4/rVg0HwKdT6TUi4tvWJeeJI8Y+R3Yh8TUo/dV5rXng5hhWbjYGLeK2 5+2vcS7OzjBX4cKDp4SxQ0ftdegmWzGwV11oSOTSoti+dumjV0WxxiA1mXztrXJbxSrN PE0IQwpqhFdtMXc1CTQ0OQwD1xjl7b4f2XR+QMDRD7J0kVnfO5RsXkluOEXnz7TxCf6b ppLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nmXy6Xne5l1JtsQtL9PITABkluWOMyiXrP5BxMdUyCI=; b=dihoWgsrtVGfgVIRgdUvC7QTAqG15zCTqVCHSV/XOZDSlcFz/HTwo6yOR4ZeqTWr31 UOx4sgOI8Qw9EPsTY/nTUEoMNY+zBg+LD0x2FsDwQIvt8QG0BWR0V7DYwdydQqMhuTi3 BM6t56T2CAhBKUFuWU3jex569Y/O3r/jqenlgfXb2dzkjT0Lh1c2lH6hRgBhRRrdY7NP 0H5gi3/9+5K4P5oFRjCOY+jytqTgBc+jLOMYAw0y7NzY8xvJn/6kTIHVTDwiU9JA7TO+ 7WjIVGTbo6jKnapLqInhms/z14QRhkOQjf9RzQzdZzzL2rnPEHqqoxdzlcHvz0KcfYcc 6lmg== X-Gm-Message-State: APjAAAWgGmvfd2zPyoJPHur5s2vDpNK4i66vQHd41NEQArq24wS+Le9G Ci4DTa3uAKcJF1VHbNrN6TvM4GjxNoM= X-Google-Smtp-Source: APXvYqySm8pnieAJtu1zo901+Bbtfsp5las4fg6wnK9lbiXN1FTz2NZsjiyOpsiX45rZpwIj34FJEg== X-Received: by 2002:a37:6292:: with SMTP id w140mr1353567qkb.24.1569865707615; Mon, 30 Sep 2019 10:48:27 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Date: Mon, 30 Sep 2019 14:48:02 -0300 Message-Id: <20190930174802.22426-10-danielhb413@gmail.com> In-Reply-To: <20190930174802.22426-1-danielhb413@gmail.com> References: <20190930174802.22426-1-danielhb413@gmail.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.66]); Mon, 30 Sep 2019 17:48:28 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.66]); Mon, 30 Sep 2019 17:48:28 +0000 (UTC) for IP:'209.85.222.193' DOMAIN:'mail-qk1-f193.google.com' HELO:'mail-qk1-f193.google.com' FROM:'danielhb413@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.15 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS) 209.85.222.193 mail-qk1-f193.google.com 209.85.222.193 mail-qk1-f193.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.66 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza , eskultet@redhat.com Subject: [libvirt] [PATCH v2 9/9] qemu_driver: VIR_AUTOFREE on other scalar pointers 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.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.65]); Mon, 30 Sep 2019 17:48:45 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" This patch uses VIR_AUTOFREE on instances of 'unsigned int *' and 'unsigned long long *' found in qemu_driver.c. Suggested-by: Erik Skultety Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_driver.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index aac952363e..4940fb083b 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -1077,7 +1077,7 @@ qemuStateStop(void) size_t i; int state; virDomainPtr *domains =3D NULL; - unsigned int *flags =3D NULL; + VIR_AUTOFREE(unsigned int *) flags =3D NULL; VIR_AUTOUNREF(virQEMUDriverConfigPtr) cfg =3D virQEMUDriverGetConfig(q= emu_driver); =20 if (!(conn =3D virConnectOpen(cfg->uri))) @@ -1115,7 +1115,6 @@ qemuStateStop(void) virObjectUnref(domains[i]); VIR_FREE(domains); } - VIR_FREE(flags); =20 return ret; } @@ -20565,7 +20564,7 @@ qemuDomainGetStatsVcpu(virQEMUDriverPtr driver, size_t i; int ret =3D -1; virVcpuInfoPtr cpuinfo =3D NULL; - unsigned long long *cpuwait =3D NULL; + VIR_AUTOFREE(unsigned long long *) cpuwait =3D NULL; =20 if (virTypedParamListAddUInt(params, virDomainDefGetVcpus(dom->def), "vcpu.current") < 0) @@ -20630,7 +20629,6 @@ qemuDomainGetStatsVcpu(virQEMUDriverPtr driver, =20 cleanup: VIR_FREE(cpuinfo); - VIR_FREE(cpuwait); return ret; } =20 --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list