Dereference before null check

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
This commit is contained in:
2xsec 2018-08-14 13:29:50 +09:00
parent df05fa0f04
commit 6926e3b80e
No known key found for this signature in database
GPG Key ID: 0BE2750EE612F372

View File

@ -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);