rofiles-fuse: Add missing error handling for fcntl()

Spotted by Coverity.

Coverity CID: 1452201

Closes: #1037
Approved by: jlebon
This commit is contained in:
Colin Walters 2017-07-31 09:34:33 -04:00 committed by Atomic Bot
parent 5daae8629e
commit e70db67c01
1 changed files with 2 additions and 0 deletions

View File

@ -96,6 +96,8 @@ callback_readdir (const char *path, void *buf, fuse_fill_dir_t filler,
if (!*path)
{
dfd = fcntl (basefd, F_DUPFD_CLOEXEC, 3);
if (dfd < 0)
return -errno;
lseek (dfd, 0, SEEK_SET);
}
else