Commit b76e8462 by Serge Hallyn Committed by Stéphane Graber

coverity: fix use-after-free in cgmanager.

parent 21a7c27f
......@@ -1243,8 +1243,10 @@ static bool collect_subsytems(void)
}
}
fclose(f);
f = NULL;
free(line);
line = NULL;
collected:
if (!nr_subsystems) {
......@@ -1257,8 +1259,10 @@ collected:
if (!cgroup_use && errno != 0)
goto out_good;
if (cgroup_use) {
if (!verify_and_prune(cgroup_use))
goto out_free;
if (!verify_and_prune(cgroup_use)) {
free_subsystems();
return false;
}
subsystems_inone[0] = NIH_MUST( strdup(cgroup_use) );
cgm_all_controllers_same = false;
}
......
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