Do not report a stack garbage as the old value for debug.ncores sysctl.

Reported by:	brucec
This commit is contained in:
Konstantin Belousov 2010-06-21 09:51:25 +00:00
parent 79d89bb0ab
commit c51050129f

View File

@ -2953,7 +2953,8 @@ sysctl_debug_num_cores_check (SYSCTL_HANDLER_ARGS)
{
int error;
int new_val;
new_val = num_cores;
error = sysctl_handle_int(oidp, &new_val, 0, req);
if (error != 0 || req->newptr == NULL)
return (error);