[libvirt PATCH] vircgroup: correctly free nested virCgroupPtr

Pavel Hrdina posted 1 patch 3 years, 2 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/07a5393ea0b57e849267be5ae08fe190d6d94fbc.1613409701.git.phrdina@redhat.com
src/util/vircgroup.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
[libvirt PATCH] vircgroup: correctly free nested virCgroupPtr
Posted by Pavel Hrdina 3 years, 2 months ago
Fixes: 184245f53b94fc84f727eb6e8a2aa52df02d69c0

Signed-off-by: Pavel Hrdina <phrdina@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 57e18d6f38..abc06b8cb0 100644
--- a/src/util/vircgroup.c
+++ b/src/util/vircgroup.c
@@ -3770,7 +3770,8 @@ virCgroupFree(virCgroupPtr group)
     g_free(group->unified.mountPoint);
     g_free(group->unified.placement);
     g_free(group->unitName);
-    g_free(group->nested);
+
+    virCgroupFree(group->nested);
 
     g_free(group);
 }
-- 
2.29.2

Re: [libvirt PATCH] vircgroup: correctly free nested virCgroupPtr
Posted by Daniel Henrique Barboza 3 years, 2 months ago

On 2/15/21 2:21 PM, Pavel Hrdina wrote:
> Fixes: 184245f53b94fc84f727eb6e8a2aa52df02d69c0
> 
> Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
> ---

Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.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 57e18d6f38..abc06b8cb0 100644
> --- a/src/util/vircgroup.c
> +++ b/src/util/vircgroup.c
> @@ -3770,7 +3770,8 @@ virCgroupFree(virCgroupPtr group)
>       g_free(group->unified.mountPoint);
>       g_free(group->unified.placement);
>       g_free(group->unitName);
> -    g_free(group->nested);
> +
> +    virCgroupFree(group->nested);
>   
>       g_free(group);
>   }
>