From nobody Tue Nov 26 21:29:03 2024 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=1565092078; cv=none; d=zoho.com; s=zohoarc; b=O2T8iUsPkNvoOXqIuUxRQt/kJzGcCWnLd/lf2l6LddoMEl7HKUpFQiu0g8rGKy0v8k6O3qLXMsyJaoFqSaeoWJMwE/b422EDJC/Mn6jlC9/waMs6xDALpzwCnLsyWBUIpDSonv8w4WXUCReVNWjoRZKce5hPg5qx7Wi1OL3R4ns= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565092078; 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=Y7Qdq8V5KVJK5JdmVFTx4q51pBbePZu6w/rqi8qsT4M=; b=TN1IkdhvSbr8Zkx/u7jEBLSN5D1v/XUNMZ1rUUTOzUo14npBKjh3ODsf5u8EMdyrXyCpnH46BFEgH1y2ivAX8aWce/3SBhMZjBRNq0z1rYUJwPZslg4DvyvjHZ+mpn1kO4PGGJPiFMwAH5y9Zq4BVVIRti35o1ZtOz+lmPacack= 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 1565092078761882.3913366408351; Tue, 6 Aug 2019 04:47:58 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6544B87633; Tue, 6 Aug 2019 11:47:57 +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 32988608A7; Tue, 6 Aug 2019 11:47:57 +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 F02233CBA; Tue, 6 Aug 2019 11:47:56 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x76BlpCP022368 for ; Tue, 6 Aug 2019 07:47:51 -0400 Received: by smtp.corp.redhat.com (Postfix) id DCFFC5DA21; Tue, 6 Aug 2019 11:47:51 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.2.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1CE035DA8C; Tue, 6 Aug 2019 11:47:50 +0000 (UTC) From: Michal Privoznik To: libvir-list@redhat.com Date: Tue, 6 Aug 2019 13:47:44 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: huaqiang.wang@intel.com Subject: [libvirt] [PATCH 1/3] qemuDomainGetResctrlMonData: Don't leak @caps 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 06 Aug 2019 11:47:57 +0000 (UTC) Content-Type: text/plain; charset="utf-8" The capabilities object must be unrefed when no longer needed. use VIR_AUTOUNREF() for that. Signed-off-by: Michal Privoznik --- src/qemu/qemu_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 3c5ec848ba..d5a8beb134 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -20737,7 +20737,7 @@ qemuDomainGetResctrlMonData(virQEMUDriverPtr driver, virDomainResctrlDefPtr resctrl =3D NULL; virQEMUResctrlMonDataPtr res =3D NULL; char **features =3D NULL; - virCapsPtr caps =3D NULL; + VIR_AUTOUNREF(virCapsPtr) caps =3D NULL; size_t i =3D 0; size_t j =3D 0; =20 --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list