Skip to content

Commit

Permalink
devpts: Make devpts_kill_sb safe if fsi is NULL
Browse files Browse the repository at this point in the history
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
  • Loading branch information
ebiederm committed Sep 22, 2016
1 parent ec0a9ba commit 0d126a7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/devpts/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,8 @@ static void devpts_kill_sb(struct super_block *sb)
{
struct pts_fs_info *fsi = DEVPTS_SB(sb);

ida_destroy(&fsi->allocated_ptys);
if (fsi)
ida_destroy(&fsi->allocated_ptys);
kfree(fsi);
kill_litter_super(sb);
}
Expand Down

0 comments on commit 0d126a7

Please sign in to comment.