fix problem where kvm_getprocs(), ..., kvm_freeprocs(), kvm_getprocs()
would get no processes.
This commit is contained in:
parent
e439c311cd
commit
de5b7fe74a
@ -428,8 +428,8 @@ kvm_getprocs(what, arg)
|
||||
return (-1);
|
||||
}
|
||||
copysize = ret;
|
||||
if (copysize > ocopysize) {
|
||||
if (ocopysize == -1)
|
||||
if (copysize > ocopysize || !kvmprocbase) {
|
||||
if (ocopysize == -1 || !kvmprocbase)
|
||||
kvmprocbase =
|
||||
(struct kinfo_proc *)malloc(copysize);
|
||||
else
|
||||
|
@ -428,8 +428,8 @@ kvm_getprocs(what, arg)
|
||||
return (-1);
|
||||
}
|
||||
copysize = ret;
|
||||
if (copysize > ocopysize) {
|
||||
if (ocopysize == -1)
|
||||
if (copysize > ocopysize || !kvmprocbase) {
|
||||
if (ocopysize == -1 || !kvmprocbase)
|
||||
kvmprocbase =
|
||||
(struct kinfo_proc *)malloc(copysize);
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user