libvirt/SOURCES/libvirt-vircgroup-correctly-free-nested-virCgroupPtr.patch

46 lines
1.4 KiB
Diff

From 7cdf83f2e699a9c9b8cafbc09dbd21d2cb3a3b45 Mon Sep 17 00:00:00 2001
Message-Id: <7cdf83f2e699a9c9b8cafbc09dbd21d2cb3a3b45@dist-git>
From: Pavel Hrdina <phrdina@redhat.com>
Date: Fri, 19 Feb 2021 13:34:01 +0100
Subject: [PATCH] vircgroup: correctly free nested virCgroupPtr
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fixes: 184245f53b94fc84f727eb6e8a2aa52df02d69c0
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
(cherry picked from commit 6a1f5e8a4f3184bb54b9dcaa3afcf8c97adccb62)
Conflicts:
src/util/vircgroup.c
- missing upstream g_free rewrite
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1798463
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Message-Id: <bc2f0207bc684ca81c45b6234a7aaba5227867d7.1613737828.git.phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
---
src/util/vircgroup.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
index d0f867ba7f..0a6404e97c 100644
--- a/src/util/vircgroup.c
+++ b/src/util/vircgroup.c
@@ -3711,7 +3711,8 @@ virCgroupFree(virCgroupPtr *group)
VIR_FREE((*group)->unified.mountPoint);
VIR_FREE((*group)->unified.placement);
VIR_FREE((*group)->unitName);
- VIR_FREE((*group)->nested);
+
+ virCgroupFree(&(*group)->nested);
VIR_FREE((*group)->path);
VIR_FREE(*group);
--
2.30.0