From 6f66c7697d3bb6a259bf8d0261490cdee0ef8986 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Mon, 16 Sep 2019 23:36:49 -0600 Subject: global: use SECURITY_DESCRIPTOR apis from x/sys/windows Signed-off-by: Jason A. Donenfeld --- tunnel/firewall/rules.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tunnel/firewall/rules.go') diff --git a/tunnel/firewall/rules.go b/tunnel/firewall/rules.go index 0ef64692..7bca508b 100644 --- a/tunnel/firewall/rules.go +++ b/tunnel/firewall/rules.go @@ -154,14 +154,13 @@ func permitWireGuardService(session uintptr, baseObjects *baseObjects, weight ui if err != nil { return wrapErr(err) } - defer windows.LocalFree(windows.Handle(unsafe.Pointer(sd.data))) conditions[1] = wtFwpmFilterCondition0{ fieldKey: cFWPM_CONDITION_ALE_USER_ID, matchType: cFWP_MATCH_EQUAL, conditionValue: wtFwpConditionValue0{ _type: cFWP_SECURITY_DESCRIPTOR_TYPE, - value: uintptr(unsafe.Pointer(sd)), + value: uintptr(unsafe.Pointer(&wtFwpByteBlob{sd.Length(), (*byte)(unsafe.Pointer(sd))})), }, } -- cgit v1.2.3-59-g8ed1b