If the pointer to the new itimerval is NULL in kern_setitimer(), just
read the old value via kern_getitimer().
This commit is contained in:
parent
a4a3daa6f1
commit
5e85ac176f
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user