fix
authorMiklos Szeredi <miklos@szeredi.hu>
Mon, 9 May 2005 11:22:41 +0000 (11:22 +0000)
committerMiklos Szeredi <miklos@szeredi.hu>
Mon, 9 May 2005 11:22:41 +0000 (11:22 +0000)
ChangeLog
include/fuse.h
lib/fuse.c

index 9fcaa874413c99639d03cec57569d2d6f48f5b63..ce7952be2b540e0bd9484445f7ef6e86c3d5dd81 100644 (file)
--- 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 <miklos@szeredi.hu>
 
        * Released 2.3-pre5
        on unmount
 
        * libfuse: add 'use_ino' option to help.  Patch by Valient Gough
-       
+
 2005-02-07  Miklos Szeredi <miklos@szeredi.hu>
 
        * Cleaned up directory reading (temporary file is not used)
index 336e8f3ea9f3fce5d5f33f2d9b5188692b43ad0d..fb1c2d6df9a28e6d6de3ebd8bcbd6cafc6726202 100644 (file)
@@ -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
index 04fb2f0fac50c65ee9a61be4f90d80e40a3a6fa4..86e97b1c6a79b4cee365db4e42fafab52625b1b0 100644 (file)
@@ -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);
+                }
             }
         }
     }