diff --git a/sys/i386/i386/sys_machdep.c b/sys/i386/i386/sys_machdep.c index 7f31e04866d8..6900e511dfc4 100644 --- a/sys/i386/i386/sys_machdep.c +++ b/sys/i386/i386/sys_machdep.c @@ -423,14 +423,14 @@ i386_set_ldt(td, args) union descriptor *descs, *dp; int descs_size; -#ifdef DEBUG - printf("i386_set_ldt: start=%d num=%d descs=%p\n", - start, num, (void *)descs); -#endif - if ((error = copyin(args, uap, sizeof(struct i386_ldt_args))) < 0) return(error); +#ifdef DEBUG + printf("i386_set_ldt: start=%d num=%d descs=%p\n", + uap->start, uap->num, (void *)uap->descs); +#endif + if (uap->descs == NULL) { /* Free descriptors */ if (uap->start == 0 && uap->num == 0) {