Skip to content

Commit baabaa5

Browse files
author
Miklos Szeredi
committed
ovl: fix tmpfile leak
Missed an error cleanup. Reported-by: [email protected] Fixes: 2b1a774 ("ovl: use vfs_tmpfile_open() helper") Cc: <[email protected]> # v6.1 Signed-off-by: Miklos Szeredi <[email protected]>
1 parent 2241ab5 commit baabaa5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/overlayfs/copy_up.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ static int ovl_copy_up_tmpfile(struct ovl_copy_up_ctx *c)
792792
if (!c->metacopy && c->stat.size) {
793793
err = ovl_copy_up_file(ofs, c->dentry, tmpfile, c->stat.size);
794794
if (err)
795-
return err;
795+
goto out_fput;
796796
}
797797

798798
err = ovl_copy_up_metadata(c, temp);

0 commit comments

Comments
 (0)