Skip to content
This repository has been archived by the owner on Aug 14, 2023. It is now read-only.

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" <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
ebiederm authored and gregkh committed Sep 23, 2016
1 parent c1b241f commit 40b320e
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 40b320e

Please sign in to comment.