Fix error checking in shm_create_largepage().
Reviewed by: alc, kib Reported by: Coverity MFC with: r365524 Differential Revision: https://reviews.freebsd.org/D26464
This commit is contained in:
parent
72f97a2d09
commit
3d1098617b
@ -65,7 +65,7 @@ shm_create_largepage(const char *path, int flags, int psind, int alloc_policy,
|
||||
int error, fd, saved_errno;
|
||||
|
||||
fd = __sys_shm_open2(path, flags | O_CREAT, mode, SHM_LARGEPAGE, NULL);
|
||||
if (error == -1)
|
||||
if (fd == -1)
|
||||
return (-1);
|
||||
|
||||
memset(&slc, 0, sizeof(slc));
|
||||
|
Loading…
Reference in New Issue
Block a user