diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c index e0b2dbc365179d8179f1a6eeb5c2c9572acf6002..9888858bb9e5316a14271daa45d2d681f0882d74 100644 --- a/fs/ubifs/dir.c +++ b/fs/ubifs/dir.c @@ -1332,6 +1332,8 @@ static int do_rename(struct inode *old_dir, struct dentry *old_dentry, err = do_tmpfile(old_dir, old_dentry, S_IFCHR | WHITEOUT_MODE, &whiteout); if (err) { + if (whiteout) + iput(whiteout); kfree(dev); goto out_release; }