diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/fuse.c | 7 | ||||
-rw-r--r-- | lib/mount.c | 2 | ||||
-rw-r--r-- | lib/ulockmgr.c | 2 |
3 files changed, 6 insertions, 5 deletions
@@ -2295,7 +2295,6 @@ static void fuse_flush(fuse_req_t req, fuse_ino_t ino, err = -ENOSYS; if (f->op.flush) err = fuse_do_flush(f, req, path, fi); - free(path); } if (f->op.lock) { struct flock lock; @@ -2314,6 +2313,7 @@ static void fuse_flush(fuse_req_t req, fuse_ino_t ino, if (err == -ENOSYS) err = 0; } + free(path); pthread_rwlock_unlock(&f->tree_lock); reply_err(req, err); } @@ -2948,9 +2948,10 @@ static struct fuse *fuse_new_common_compat(int fd, const char *opts, struct fuse *f; struct fuse_args args = FUSE_ARGS_INIT(0, NULL); + if (fuse_opt_add_arg(&args, "") == -1) + return NULL; if (opts && - (fuse_opt_add_arg(&args, "") == -1 || - fuse_opt_add_arg(&args, "-o") == -1 || + (fuse_opt_add_arg(&args, "-o") == -1 || fuse_opt_add_arg(&args, opts) == -1)) { fuse_opt_free_args(&args); return NULL; diff --git a/lib/mount.c b/lib/mount.c index a72294b..cbdedf3 100644 --- a/lib/mount.c +++ b/lib/mount.c @@ -151,7 +151,7 @@ static int receive_fd(int fd) struct iovec iov; char buf[1]; int rv; - char ccmsg[CMSG_SPACE(sizeof(int))]; + size_t ccmsg[CMSG_SPACE(sizeof(int)) / sizeof(size_t)]; struct cmsghdr *cmsg; iov.iov_base = buf; diff --git a/lib/ulockmgr.c b/lib/ulockmgr.c index 9e9c2b6..bf27b36 100644 --- a/lib/ulockmgr.c +++ b/lib/ulockmgr.c @@ -75,7 +75,7 @@ static int ulockmgr_send_message(int sock, void *buf, size_t buflen, struct msghdr msg; struct cmsghdr *p_cmsg; struct iovec vec; - char cmsgbuf[CMSG_SPACE(sizeof(int) * MAX_SEND_FDS)]; + size_t cmsgbuf[CMSG_SPACE(sizeof(int) * MAX_SEND_FDS) / sizeof(size_t)]; int res; assert(numfds <= MAX_SEND_FDS); |