mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-02-11 19:20:40 +08: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
e72d7d8531
commit
6a61d1ff9d
@ -1253,6 +1253,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 New Issue
Block a user