diff options
author | Colin Walters <walters@verbum.org> | 2017-07-31 09:34:33 -0400 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2017-08-02 15:34:16 +0000 |
commit | e70db67c018f34f404ae9ef5a992e7a67d377301 (patch) | |
tree | b00707d7cfc1e9846de765209e169c8910ac55e3 /src/rofiles-fuse | |
parent | 5daae8629e84444879e7c94ccc990b7b906c58a6 (diff) | |
download | ostree-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.c | 2 |
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 |