提交 c4157e52 编写于 作者: R Ryota Ozaki 提交者: Eric Blake

cgroup: Fix possible memory leak in virCgroupMakeGroup

* src/util/cgroup.c: free temporal path string before breaking loop
上级 b9c4db0d
......@@ -472,8 +472,10 @@ 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;
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册