Commit 034ef75d by Serge Hallyn

coverity: free dent_buf on error path (cgroup.c)

parent 5903da82
......@@ -1864,8 +1864,10 @@ int cgroup_recursive_task_count(const char *cgroup_path)
process_lock();
d = opendir(cgroup_path);
process_unlock();
if (!d)
if (!d) {
free(dent_buf);
return 0;
}
while (readdir_r(d, dent_buf, &dent) == 0 && dent) {
const char *parts[3] = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment