https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a9e7d674278b3f50e7519…
commit a9e7d674278b3f50e751998578484b1a7923990c
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Sun Dec 29 12:17:55 2024 +0100
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Sun Dec 29 12:17:55 2024 +0100
[MSV1_0] LsaApLogonTerminated: Delete the logged-on user from the logon list
---
dll/win32/msv1_0/msv1_0.c | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/dll/win32/msv1_0/msv1_0.c b/dll/win32/msv1_0/msv1_0.c
index 35584bba37f..46d6bff6f55 100644
--- a/dll/win32/msv1_0/msv1_0.c
+++ b/dll/win32/msv1_0/msv1_0.c
@@ -1322,9 +1322,30 @@ LsaApInitializePackage(IN ULONG AuthenticationPackageId,
*/
VOID
NTAPI
-LsaApLogonTerminated(IN PLUID LogonId)
+LsaApLogonTerminated(
+ _In_ PLUID LogonId)
{
+ PLOGON_LIST_ENTRY LogonEntry;
+
TRACE("LsaApLogonTerminated()\n");
+
+ /* Remove the given logon entry from the list */
+ LogonEntry = GetLogonByLogonId(LogonId);
+ if (LogonEntry != NULL)
+ {
+ RemoveEntryList(&LogonEntry->ListEntry);
+
+ if (LogonEntry->UserName.Buffer)
+ RtlFreeHeap(RtlGetProcessHeap(), 0, LogonEntry->UserName.Buffer);
+
+ if (LogonEntry->LogonDomainName.Buffer)
+ RtlFreeHeap(RtlGetProcessHeap(), 0, LogonEntry->LogonDomainName.Buffer);
+
+ if (LogonEntry->LogonServer.Buffer)
+ RtlFreeHeap(RtlGetProcessHeap(), 0, LogonEntry->LogonServer.Buffer);
+
+ RtlFreeHeap(RtlGetProcessHeap(), 0, LogonEntry);
+ }
}