]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
cgroup.c: avoid unconditional leaks
authorJim Meyering <meyering@redhat.com>
Thu, 4 Feb 2010 10:14:03 +0000 (11:14 +0100)
committerJim Meyering <meyering@redhat.com>
Thu, 4 Feb 2010 19:00:07 +0000 (20:00 +0100)
* src/util/cgroup.c (virCgroupCpuSetInherit) [HAVE_MNTENT_H]:
Don't leak CPU-set inheritance value strings.

src/util/cgroup.c

index c80cf50311064dcacfd15ad1c29b167eeed6854c..e6f027059a69033e2943ac2c00bb74bfc427f009 100644 (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);