From 21019c96f5f9f8d5f7630acc2e897da077c0f097 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Mon, 9 May 2005 11:22:41 +0000 Subject: fix --- lib/fuse.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib/fuse.c') 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); + } } } } -- cgit v1.2.3