mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-25 19:14:04 +00:00
shm: Sanitize ret val checks in shmem_wait_and_open
Acked-by: Andrey Vagin <avagin@parallels.com> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
6faac3a39e
commit
8e47df998c
1 changed files with 2 additions and 4 deletions
|
|
@ -157,11 +157,9 @@ static int shmem_wait_and_open(int pid, struct shmem_info *si)
|
|||
|
||||
pr_info("%d: Opening shmem [%s] \n", pid, path);
|
||||
ret = open(path, O_RDWR);
|
||||
if (ret >= 0)
|
||||
return ret;
|
||||
else if (ret < 0)
|
||||
if (ret < 0)
|
||||
pr_perror(" %d: Can't stat shmem at %s",
|
||||
si->pid, path);
|
||||
si->pid, path);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue