mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-13 00:46:03 -06:00
cgroup: Fix possible memory leak in virCgroupMakeGroup
* src/util/cgroup.c: free temporal path string before breaking loop
This commit is contained in:
parent
b9c4db0d70
commit
c4157e5272
@ -472,10 +472,12 @@ static int virCgroupMakeGroup(virCgroupPtr parent, virCgroupPtr group, int creat
|
||||
(i == VIR_CGROUP_CONTROLLER_CPUSET ||
|
||||
STREQ(group->controllers[i].mountPoint, group->controllers[VIR_CGROUP_CONTROLLER_CPUSET].mountPoint))) {
|
||||
rc = virCgroupCpuSetInherit(parent, group);
|
||||
if (rc != 0)
|
||||
if (rc != 0) {
|
||||
VIR_FREE(path);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
VIR_FREE(path);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user