In ttyinfo() check that ps_vmspace isn't NULL before calculating the
authorkettenis <kettenis@openbsd.org>
Wed, 19 May 2021 18:10:45 +0000 (18:10 +0000)
committerkettenis <kettenis@openbsd.org>
Wed, 19 May 2021 18:10:45 +0000 (18:10 +0000)
commit2c417a9eed782cc86302610b11dd2650081be304
tree1c7d7343e205699cacc5a5744d1bb358277dad31
parentb1d72b5f52b57d4b462f4d9242bd78d6b7a9edd2
In ttyinfo() check that ps_vmspace isn't NULL before calculating the
resident set size.  This replicates what the sysctl code does and fixes
a kernel crash reported by robert@

ok deraadt@
sys/kern/tty.c