Initialize len to avoid ENOMEM from sysctl(3).
PR: 248933 Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
b6c3b1a92d
commit
8e6b8fc655
@ -66,6 +66,7 @@ get_maxuser_address(void)
|
||||
mib[1] = KERN_PROC;
|
||||
mib[2] = KERN_PROC_PS_STRINGS;
|
||||
mib[3] = getpid();
|
||||
len = sizeof(psstrings);
|
||||
error = sysctl(mib, nitems(mib), &psstrings, &len, NULL, 0);
|
||||
if (error != 0)
|
||||
return (0);
|
||||
|
Loading…
Reference in New Issue
Block a user