From 39d22d66ea0569f7fb6cfe77a3ffe5797443c467 Mon Sep 17 00:00:00 2001 From: Alastair Poole Date: Mon, 11 May 2020 17:00:33 +0100 Subject: [PATCH] macos: dont return if we cannot get workqueueinfo. Set the memory to zero here when it's unavailable. --- src/bin/process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/process.c b/src/bin/process.c index 1e373fa..3362b86 100644 --- a/src/bin/process.c +++ b/src/bin/process.c @@ -671,7 +671,7 @@ proc_info_by_pid(int pid) size = proc_pidinfo(pid, PROC_PIDWORKQUEUEINFO, 0, &workqueue, sizeof(workqueue)); if (size != sizeof(workqueue)) - return NULL; + memset(&workqueue, 0, sizeof(struct proc_workqueueinfo)); Proc_Info *p = calloc(1, sizeof(Proc_Info)); if (!p) return NULL;