mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-17 15:27:36 +00:00
If you insert a pccard modem and then eject it, you get a panic. This
happens because the sio device was never opened and com->tp is therefore NULL. ttygone can't swallow a NULL, so guard against that possibility. Other places in this function make similar checks, so I believe this is correct.
This commit is contained in:
parent
0cfc058a42
commit
a7092dac2e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=132561
@ -454,7 +454,8 @@ siodetach(dev)
|
||||
return (0);
|
||||
}
|
||||
com->gone = TRUE;
|
||||
ttygone(com->tp);
|
||||
if (com->tp)
|
||||
ttygone(com->tp);
|
||||
for (i = 0 ; i < 6; i++)
|
||||
destroy_dev(com->devs[i]);
|
||||
if (com->irqres) {
|
||||
|
Loading…
Reference in New Issue
Block a user