1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

The previous commit included a change to fill_kinfo_proc() that results

in a NULL pointer dereference.  Repair this mistake.
This commit is contained in:
Alan Cox 2002-02-12 04:21:28 +00:00
parent 0cab7c4b08
commit 96347d1e6d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=90558

View File

@ -492,7 +492,6 @@ fill_kinfo_proc(p, kp)
bzero(kp, sizeof(*kp));
td = FIRST_THREAD_IN_PROC(p);
kp->ki_structsize = sizeof(*kp);
kp->ki_paddr = p;
PROC_LOCK(p);
@ -540,6 +539,7 @@ fill_kinfo_proc(p, kp)
kp->ki_childtime.tv_usec = p->p_stats->p_cru.ru_utime.tv_usec +
p->p_stats->p_cru.ru_stime.tv_usec;
}
td = FIRST_THREAD_IN_PROC(p);
if (td->td_wmesg != NULL)
strncpy(kp->ki_wmesg, td->td_wmesg, sizeof(kp->ki_wmesg) - 1);
if (p->p_stat == SMTX) {