fuse: fix memory leak in fuse_create_open

The memory of struct fuse_file is allocated but not freed
when get_create_ext return error.

Fixes: 3e2b6fdbdc ("fuse: send security context of inode on file")
Cc: stable@vger.kernel.org # v5.17
Signed-off-by: yangyun <yangyun50@huawei.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
This commit is contained in:
yangyun 2024-08-23 16:51:46 +08:00 committed by Miklos Szeredi
parent 97f30876c9
commit 3002240d16

View File

@ -670,7 +670,7 @@ static int fuse_create_open(struct inode *dir, struct dentry *entry,
err = get_create_ext(&args, dir, entry, mode);
if (err)
goto out_put_forget_req;
goto out_free_ff;
err = fuse_simple_request(fm, &args);
free_ext_value(&args);