mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-20 15:43:16 +00:00
Call tty_close() at the very end of ttyclose() since otherwise NULL
deferences can occur since tty_close() may end up freeing the tty structure if it drops the last reference to it. Glanced at by: phk
This commit is contained in:
parent
1c622ae41e
commit
9e6c867ccc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=139449
@ -3172,10 +3172,10 @@ ttyclose(struct cdev *dev, int flag, int mode, struct thread *td)
|
||||
ttyldoptim(tp);
|
||||
if (tp->t_close != NULL)
|
||||
tp->t_close(tp);
|
||||
tty_close(tp);
|
||||
tp->t_do_timestamp = 0;
|
||||
if (tp->t_pps != NULL)
|
||||
tp->t_pps->ppsparam.mode = 0;
|
||||
tty_close(tp);
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user