qibfs: fix _another_ leak
[ Upstream commit bdb43af4fdb39f844ede401bdb1258f67a580a27 ] failure to allocate inode => leaked dentry... this one had been there since the initial merge; to be fair, if we are that far OOM, the odds of failing at that particular allocation are low... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
db437e9854
commit
5d53e88d83
@@ -55,6 +55,7 @@ static int qibfs_mknod(struct inode *dir, struct dentry *dentry,
|
|||||||
struct inode *inode = new_inode(dir->i_sb);
|
struct inode *inode = new_inode(dir->i_sb);
|
||||||
|
|
||||||
if (!inode) {
|
if (!inode) {
|
||||||
|
dput(dentry);
|
||||||
error = -EPERM;
|
error = -EPERM;
|
||||||
goto bail;
|
goto bail;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user