render / rpms / libvirt

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