Skip to content

Commit

Permalink
cgroup: print errors for umount and rmdir
Browse files Browse the repository at this point in the history
CID 155804 (#1 of 1): Unchecked return value (CHECKED_RETURN)
2. check_return: Calling umount2 without checking return value (as is done elsewhere 8 out of 9 times).
  • Loading branch information
avagin committed Feb 16, 2018
1 parent 5ab6836 commit 04c1634
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions criu/cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1163,8 +1163,10 @@ void fini_cgroup(void)
return;

close_service_fd(CGROUP_YARD);
umount2(cg_yard, MNT_DETACH);
rmdir(cg_yard);
if (umount2(cg_yard, MNT_DETACH))
pr_perror("Unable to umount %s", cg_yard);
if (rmdir(cg_yard))
pr_perror("Unable to remove %s", cg_yard);
xfree(cg_yard);
cg_yard = NULL;
}
Expand Down

0 comments on commit 04c1634

Please sign in to comment.