]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
qibfs: fix _another_ leak
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 13 May 2024 23:50:34 +0000 (17:50 -0600)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 13 Mar 2025 02:13:38 +0000 (22:13 -0400)
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>
drivers/infiniband/hw/qib/qib_fs.c

index b27791029fa9349e5c7b8f2a2c8458df9eed4073..b9f4a2937c3acc2dc31d42ce22f5369debdba194 100644 (file)
@@ -55,6 +55,7 @@ static int qibfs_mknod(struct inode *dir, struct dentry *dentry,
        struct inode *inode = new_inode(dir->i_sb);
 
        if (!inode) {
+               dput(dentry);
                error = -EPERM;
                goto bail;
        }