tools: use g_autoptr for virCgroup

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
This commit is contained in:
Pavel Hrdina 2020-09-22 12:52:38 +02:00
parent a9932fc292
commit 7c878cf9a7

View File

@ -289,7 +289,7 @@ int virHostValidateCGroupControllers(const char *hvname,
int controllers,
virHostValidateLevel level)
{
virCgroupPtr group = NULL;
g_autoptr(virCgroup) group = NULL;
int ret = 0;
size_t i;
@ -315,8 +315,6 @@ int virHostValidateCGroupControllers(const char *hvname,
}
}
virCgroupFree(group);
return ret;
}
#else /* !__linux__ */