cgroup.c: avoid unconditional leaks

* src/util/cgroup.c (virCgroupCpuSetInherit) [HAVE_MNTENT_H]:
Don't leak CPU-set inheritance value strings.
This commit is contained in:
Jim Meyering 2010-02-04 11:14:03 +01:00
parent b56fbbad0b
commit a16a96942d

View File

@ -432,6 +432,7 @@ static int virCgroupCpuSetInherit(virCgroupPtr parent, virCgroupPtr group)
VIR_CGROUP_CONTROLLER_CPUSET,
inherit_values[i],
value);
VIR_FREE(value);
if (rc != 0) {
VIR_ERROR("Failed to set %s %d", inherit_values[i], rc);