Browse Source

posix: fix close() if fd_obj was closed already

pr/rotary
Martine Lenders 6 years ago
parent
commit
bac4118d68
  1. 2
      sys/posix/unistd.c

2
sys/posix/unistd.c

@ -22,7 +22,7 @@ int close(int fildes)
{
fd_t *fd_obj = fd_get(fildes);
if (!fd_obj) {
if (!fd_obj || (fd_obj->close == NULL)) {
errno = EBADF;
return -1;
}

Loading…
Cancel
Save