mirror of https://gitee.com/openkylin/libvirt.git
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:
parent
a9932fc292
commit
7c878cf9a7
|
@ -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__ */
|
||||
|
|
Loading…
Reference in New Issue