From nobody Sat Feb 7 05:49:39 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 153294238853563.8821037372569; Mon, 30 Jul 2018 02:19:48 -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 4C6BE91500; Mon, 30 Jul 2018 09:19:46 +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 140322B3A7; Mon, 30 Jul 2018 09:19:46 +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 BDC654A46C; Mon, 30 Jul 2018 09:19:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w6U9JfwL020559 for ; Mon, 30 Jul 2018 05:19:41 -0400 Received: by smtp.corp.redhat.com (Postfix) id 64A0A7C30; Mon, 30 Jul 2018 09:19:41 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.2.192]) by smtp.corp.redhat.com (Postfix) with ESMTP id 03FC77C2F for ; Mon, 30 Jul 2018 09:19:40 +0000 (UTC) From: Michal Privoznik To: libvir-list@redhat.com Date: Mon, 30 Jul 2018 11:19:34 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/3] Revert "util: cgroup: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC" 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: , MIME-Version: 1.0 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.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 30 Jul 2018 09:19:46 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" This reverts commit 4da4a9fe0c0956feefe3d592b4ba2b92b2a9a2f9. Turns out, our code relies on virCgroupFree(&var) setting var =3D NULL. Signed-off-by: Michal Privoznik --- src/util/vircgroup.c | 1 + src/util/vircgroup.h | 9 ++------- src/util/vircgrouppriv.h | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index 6f7b5b40f7..4e34bf5885 100644 --- a/src/util/vircgroup.c +++ b/src/util/vircgroup.c @@ -50,6 +50,7 @@ #include "vircgrouppriv.h" =20 #include "virutil.h" +#include "viralloc.h" #include "virerror.h" #include "virlog.h" #include "virfile.h" diff --git a/src/util/vircgroup.h b/src/util/vircgroup.h index 065861d700..e4ffd57b6b 100644 --- a/src/util/vircgroup.h +++ b/src/util/vircgroup.h @@ -27,11 +27,9 @@ =20 # include "virutil.h" # include "virbitmap.h" -# include "viralloc.h" =20 -struct _virCgroup; -typedef struct _virCgroup virCgroup; -typedef virCgroup *virCgroupPtr; +struct virCgroup; +typedef struct virCgroup *virCgroupPtr; =20 enum { VIR_CGROUP_CONTROLLER_CPU, @@ -299,7 +297,4 @@ int virCgroupSetOwner(virCgroupPtr cgroup, int virCgroupHasEmptyTasks(virCgroupPtr cgroup, int controller); =20 bool virCgroupControllerAvailable(int controller); - -VIR_DEFINE_AUTOPTR_FUNC(virCgroup, virCgroupFree) - #endif /* __VIR_CGROUP_H__ */ diff --git a/src/util/vircgrouppriv.h b/src/util/vircgrouppriv.h index a72bee1ef2..722863e5b6 100644 --- a/src/util/vircgrouppriv.h +++ b/src/util/vircgrouppriv.h @@ -42,7 +42,7 @@ struct virCgroupController { char *placement; }; =20 -struct _virCgroup { +struct virCgroup { char *path; =20 struct virCgroupController controllers[VIR_CGROUP_CONTROLLER_LAST]; --=20 2.16.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list