Skip to content

Commit

Permalink
omfs: fix memory leak
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Davidlohr Bueso authored and Bob Copeland committed Jul 6, 2010
1 parent 815c416 commit 70d9e38
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/omfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,8 @@ static int omfs_fill_super(struct super_block *sb, void *data, int silent)
out_brelse_bh:
brelse(bh);
end:
if (ret)
kfree(sbi);
return ret;
}

Expand Down

0 comments on commit 70d9e38

Please sign in to comment.