devpts: Make devpts_kill_sb safe if fsi is NULL
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
c1b241f0c1
commit
40b320e1c7
|
@ -458,6 +458,7 @@ static void devpts_kill_sb(struct super_block *sb)
|
||||||
{
|
{
|
||||||
struct pts_fs_info *fsi = DEVPTS_SB(sb);
|
struct pts_fs_info *fsi = DEVPTS_SB(sb);
|
||||||
|
|
||||||
|
if (fsi)
|
||||||
ida_destroy(&fsi->allocated_ptys);
|
ida_destroy(&fsi->allocated_ptys);
|
||||||
kfree(fsi);
|
kfree(fsi);
|
||||||
kill_litter_super(sb);
|
kill_litter_super(sb);
|
||||||
|
|
Loading…
Reference in New Issue