Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 17e18ab6 authored by Julia Lawall's avatar Julia Lawall Committed by Miklos Szeredi
Browse files

fuse: add missing fuse_request_free

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: default avatarJulia Lawall <julia@diku.dk>
Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
parent 769415c6
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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);