From 6e7d018049193efe9d092bb91c4416a332f28278 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Fri, 19 Jan 2007 22:11:40 +0000 Subject: merge up to fuse_2_6_merge1 --- lib/fuse.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/fuse.c') diff --git a/lib/fuse.c b/lib/fuse.c index 4446245..994a31f 100644 --- a/lib/fuse.c +++ b/lib/fuse.c @@ -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; -- cgit v1.2.3