From: Miklos Szeredi Date: Mon, 9 May 2005 11:22:41 +0000 (+0000) Subject: fix X-Git-Tag: fuse_2_3_rc1~4 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=21019c96f5f9f8d5f7630acc2e897da077c0f097;p=qemu-gpiodev%2Flibfuse.git fix --- diff --git a/ChangeLog b/ChangeLog index 9fcaa87..ce7952b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -33,7 +33,7 @@ * Make checking of permission for other users more strict. Now the same privilege is required for the mount owner as for ptrace on the process performing the filesystem operation. - + 2005-04-23 Miklos Szeredi * Released 2.3-pre5 @@ -171,7 +171,7 @@ on unmount * libfuse: add 'use_ino' option to help. Patch by Valient Gough - + 2005-02-07 Miklos Szeredi * Cleaned up directory reading (temporary file is not used) diff --git a/include/fuse.h b/include/fuse.h index 336e8f3..fb1c2d6 100644 --- a/include/fuse.h +++ b/include/fuse.h @@ -252,7 +252,7 @@ struct fuse_operations { * should use this. * * The filesystem may choose between two modes of operation: - * + * * 1) The readdir implementation ignores the offset parameter, and * passes zero to the filler function's offset. The filler * function will not return '1' (unless an error happens), so the diff --git a/lib/fuse.c b/lib/fuse.c index 04fb2f0..86e97b1 100644 --- a/lib/fuse.c +++ b/lib/fuse.c @@ -1626,7 +1626,7 @@ static int fill_dir_common(struct fuse_dirhandle *dh, const char *name, if (newlen > dh->needlen) return 1; } - + newptr = realloc(dh->contents, newlen); if (!newptr) { dh->error = -ENOMEM; @@ -1805,7 +1805,7 @@ void fuse_process_cmd(struct fuse *f, struct fuse_cmd *cmd) if ((f->flags & FUSE_ALLOW_ROOT) && in->uid != f->owner && in->uid != 0 && in->opcode != FUSE_INIT && in->opcode != FUSE_READ && - in->opcode != FUSE_WRITE && in->opcode != FUSE_FSYNC && + in->opcode != FUSE_WRITE && in->opcode != FUSE_FSYNC && in->opcode != FUSE_RELEASE && in->opcode != FUSE_READDIR && in->opcode != FUSE_FSYNCDIR && in->opcode != FUSE_RELEASEDIR) { send_reply(f, in, -EACCES, NULL, 0); @@ -2199,8 +2199,10 @@ void fuse_destroy(struct fuse *f) for (node = f->id_table[i]; node != NULL; node = node->id_next) { if (node->is_hidden) { char *path = get_path(f, node->nodeid); - if (path) + if (path) { f->op.unlink(path); + free(path); + } } } }