diff --git a/sys/kern/kern_thr.c b/sys/kern/kern_thr.c index dc9953b21c22..b460bd3b7bbf 100644 --- a/sys/kern/kern_thr.c +++ b/sys/kern/kern_thr.c @@ -126,6 +126,8 @@ kern_thr_new(struct thread *td, struct thr_param *param) rtpp = NULL; if (param->rtp != 0) { error = copyin(param->rtp, &rtp, sizeof(struct rtprio)); + if (error) + return (error); rtpp = &rtp; } error = create_thread(td, NULL, param->start_func, param->arg,