mirror of
https://github.com/postgres/postgres.git
synced 2026-02-23 18:04:41 -05:00
Properly close token in sspi authentication
We can never leak more than one token, but we shouldn't do that. We don't bother closing it in the error paths since the process will exit shortly anyway. Christian Ullrich
This commit is contained in:
parent
7393208b51
commit
ab49f87d5c
1 changed files with 2 additions and 0 deletions
|
|
@ -1255,6 +1255,8 @@ pg_SSPI_recvauth(Port *port)
|
|||
(errmsg_internal("could not get user token: error code %lu",
|
||||
GetLastError())));
|
||||
|
||||
CloseHandle(token);
|
||||
|
||||
if (!LookupAccountSid(NULL, tokenuser->User.Sid, accountname, &accountnamesize,
|
||||
domainname, &domainnamesize, &accountnameuse))
|
||||
ereport(ERROR,
|
||||
|
|
|
|||
Loading…
Reference in a new issue