X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/5ba3f43ea354af8ad55bea84372a2bc834d8757c..5c9f46613a83ebfc29a5b1f099448259e96a98f0:/bsd/kern/sys_coalition.c diff --git a/bsd/kern/sys_coalition.c b/bsd/kern/sys_coalition.c index 85100962e..5cb3daa6b 100644 --- a/bsd/kern/sys_coalition.c +++ b/bsd/kern/sys_coalition.c @@ -484,6 +484,11 @@ static int sysctl_coalition_get_pid_list SYSCTL_HANDLER_ARGS out: proc_rele(tproc); + if (npids < 0) { + /* npids is a negative errno */ + return -npids; + } + if (npids == 0) return ENOENT;