Skip to content

Commit 70d9e38

Browse files
davidlohrbcopeland
authored andcommitted
omfs: fix memory leak
In the error path of omfs_fill_super(), the FS super block info (sbi) is not being freed. Correct this. Signed-off-by: Davidlohr Bueso <dave@gnu.org> Signed-off-by: Bob Copeland <me@bobcopeland.com>
1 parent 815c416 commit 70d9e38

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎fs/omfs/inode.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,8 @@ static int omfs_fill_super(struct super_block *sb, void *data, int silent)
529529
out_brelse_bh:
530530
brelse(bh);
531531
end:
532+
if (ret)
533+
kfree(sbi);
532534
return ret;
533535
}
534536

0 commit comments

Comments
 (0)