diff options
author | jhb <jhb@FreeBSD.org> | 2005-02-07 21:45:48 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2005-02-07 21:45:48 +0000 |
commit | 221a30b414f82933a09b844b71a55202395df598 (patch) | |
tree | 0f04fc3ce8cce043681a3c0ec6cd1ed3e2e978ef /sys/kern/kern_time.c | |
parent | 02bfff4c56f6f8324d4a82f6409eb4a3d8151a0b (diff) | |
download | FreeBSD-src-221a30b414f82933a09b844b71a55202395df598.zip FreeBSD-src-221a30b414f82933a09b844b71a55202395df598.tar.gz |
If the pointer to the new itimerval is NULL in kern_setitimer(), just
read the old value via kern_getitimer().
Diffstat (limited to 'sys/kern/kern_time.c')
-rw-r--r-- | sys/kern/kern_time.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c index 76572b6..a71e995 100644 --- a/sys/kern/kern_time.c +++ b/sys/kern/kern_time.c @@ -516,6 +516,9 @@ kern_setitimer(struct thread *td, u_int which, struct itimerval *aitv, struct proc *p = td->td_proc; struct timeval ctv; + if (aitv == NULL) + return (kern_getitimer(td, which, oitv)); + if (which > ITIMER_PROF) return (EINVAL); if (itimerfix(&aitv->it_value)) |