mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-05 08:45:49 +00:00
cgroup: print errors for umount and rmdir
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). Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user