Skip to content

Commit

Permalink
Fix CompareObjectHandles check to run if syscall is available
Browse files Browse the repository at this point in the history
Check would previously be skipped if CompareObjectHandles syscall was found

Signed-off-by: James Hiew <james@hiew.net>
  • Loading branch information
jameshiew committed Dec 27, 2024
1 parent 6928ff1 commit 07dc740
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/common/peertracker/npipe_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 07dc740

Please sign in to comment.