From 07dc740d4e152bdd9f5d96e33e4e86202766509a Mon Sep 17 00:00:00 2001 From: James Hiew Date: Fri, 27 Dec 2024 17:53:48 +0000 Subject: [PATCH] Fix CompareObjectHandles check to run if syscall is available Check would previously be skipped if CompareObjectHandles syscall was found Signed-off-by: James Hiew --- pkg/common/peertracker/npipe_windows.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/peertracker/npipe_windows.go b/pkg/common/peertracker/npipe_windows.go index 8dca5b8f5b..472ef05cac 100644 --- a/pkg/common/peertracker/npipe_windows.go +++ b/pkg/common/peertracker/npipe_windows.go @@ -65,7 +65,7 @@ func isCompareObjectHandlesFound() bool { // compareObjectHandles compares two object handles to determine if they // refer to the same underlying kernel object func compareObjectHandles(firstHandle, secondHandle windows.Handle) error { - if isCompareObjectHandlesFound() { + if procCompareObjectHandlesErr != nil { return procCompareObjectHandlesErr } r1, _, e1 := syscall.SyscallN(procCompareObjectHandles.Addr(), uintptr(firstHandle), uintptr(secondHandle))