summaryrefslogtreecommitdiff
path: root/src/rofiles-fuse
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2017-07-31 09:34:33 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2017-08-02 15:34:16 +0000
commite70db67c018f34f404ae9ef5a992e7a67d377301 (patch)
treeb00707d7cfc1e9846de765209e169c8910ac55e3 /src/rofiles-fuse
parent5daae8629e84444879e7c94ccc990b7b906c58a6 (diff)
downloadostree-e70db67c018f34f404ae9ef5a992e7a67d377301.tar.gz
rofiles-fuse: Add missing error handling for fcntl()
Spotted by Coverity. Coverity CID: 1452201 Closes: #1037 Approved by: jlebon
Diffstat (limited to 'src/rofiles-fuse')
-rw-r--r--src/rofiles-fuse/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rofiles-fuse/main.c b/src/rofiles-fuse/main.c
index 12a9d886..88cdba6c 100644
--- a/src/rofiles-fuse/main.c
+++ b/src/rofiles-fuse/main.c
@@ -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