Skip to content

Commit

Permalink
coverity: #1438392
Browse files Browse the repository at this point in the history
Dereference before null check

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
  • Loading branch information
2xsec committed Aug 14, 2018
1 parent df05fa0 commit 6926e3b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/lxc/pam/pam_cgfs.c
Expand Up @@ -1897,8 +1897,7 @@ static bool cg_filter_and_set_cpus(char *path, bool am_initialized)
copy_parent:
*lastslash = oldv;

if (fpath)
free(fpath);
free(fpath);

fpath = must_make_path(path, "cpuset.cpus", NULL);
ret = write_to_file(fpath, cpulist, strlen(cpulist), false);
Expand Down

0 comments on commit 6926e3b

Please sign in to comment.