]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
fuse: add missing fuse_request_free
authorJulia Lawall <julia@diku.dk>
Thu, 16 Oct 2008 14:08:56 +0000 (16:08 +0200)
committerMiklos Szeredi <miklos@szeredi.hu>
Thu, 16 Oct 2008 14:08:56 +0000 (16:08 +0200)
The error handling code for the second call to fuse_request_alloc should
include freeing the result of the first one.

This bug was found by the Coccinelle project:

  http://www.emn.fr/x-info/coccinelle/

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
fs/fuse/inode.c

index 6a84388cacff6f3e0cf5a5d9e307bad71610d5df..54b1f0e1ef58325b2a6de0b52e1a0532fdecd801 100644 (file)
@@ -865,7 +865,7 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent)
        if (is_bdev) {
                fc->destroy_req = fuse_request_alloc();
                if (!fc->destroy_req)
-                       goto err_put_root;
+                       goto err_free_init_req;
        }
 
        mutex_lock(&fuse_mutex);
@@ -895,6 +895,7 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent)
 
  err_unlock:
        mutex_unlock(&fuse_mutex);
+ err_free_init_req:
        fuse_request_free(init_req);
  err_put_root:
        dput(root_dentry);