Fix installation crashes when `allowservicelogon` is `true`

pull/660/head
NextTurn 2020-08-25 00:00:00 +08:00
parent ba562f20f7
commit 959b6789d7
No known key found for this signature in database
GPG Key ID: 17A0D50ADDE1A0C4
2 changed files with 0 additions and 4 deletions

View File

@ -17,7 +17,6 @@ namespace WinSW.Native
} }
finally finally
{ {
_ = FreeSid(sid);
Marshal.FreeHGlobal(sid); Marshal.FreeHGlobal(sid);
} }
} }

View File

@ -7,9 +7,6 @@ namespace WinSW.Native
{ {
internal static class SecurityApis internal static class SecurityApis
{ {
[DllImport(Libraries.Advapi32, SetLastError = false)]
internal static extern IntPtr FreeSid(IntPtr sid);
[DllImport(Libraries.Advapi32, SetLastError = true)] [DllImport(Libraries.Advapi32, SetLastError = true)]
internal static extern bool GetTokenInformation( internal static extern bool GetTokenInformation(
IntPtr tokenHandle, IntPtr tokenHandle,