Unverified Commit 2fc67556 by 2xsec Committed by Christian Brauner

coverity: #1438392

Dereference before null check Signed-off-by: 's avatar2xsec <dh48.jeong@samsung.com>
parent d3bcd794
...@@ -1897,8 +1897,7 @@ static bool cg_filter_and_set_cpus(char *path, bool am_initialized) ...@@ -1897,8 +1897,7 @@ static bool cg_filter_and_set_cpus(char *path, bool am_initialized)
copy_parent: copy_parent:
*lastslash = oldv; *lastslash = oldv;
if (fpath) free(fpath);
free(fpath);
fpath = must_make_path(path, "cpuset.cpus", NULL); fpath = must_make_path(path, "cpuset.cpus", NULL);
ret = write_to_file(fpath, cpulist, strlen(cpulist), false); ret = write_to_file(fpath, cpulist, strlen(cpulist), 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