From 7934e35cdf55b07334f04d86d9c7717b0cb41c0b Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Sun, 5 May 2013 00:39:58 +0000 Subject: [PATCH] [LSASRV] Free additional data returned by calls to LsaApLogonUser/Ex/2. svn path=/trunk/; revision=58933 --- reactos/dll/win32/lsasrv/authpackage.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/reactos/dll/win32/lsasrv/authpackage.c b/reactos/dll/win32/lsasrv/authpackage.c index a5af21fedee..04d23726bd0 100644 --- a/reactos/dll/win32/lsasrv/authpackage.c +++ b/reactos/dll/win32/lsasrv/authpackage.c @@ -743,6 +743,7 @@ done: if (LocalAuthInfo != NULL) RtlFreeHeap(RtlGetProcessHeap(), 0, LocalAuthInfo); + /* Free the token information */ if (TokenInformation != NULL) { if (TokenInformationType == LsaTokenInformationV1) @@ -786,19 +787,31 @@ done: } } + /* Free the account name */ if (AccountName != NULL) { + if (AccountName->Buffer != NULL) + LsapFreeHeap(AccountName->Buffer); + LsapFreeHeap(AccountName); } + /* Free the authentication authority */ if (AuthenticatingAuthority != NULL) { + if (AuthenticatingAuthority != NULL) + LsapFreeHeap(AuthenticatingAuthority->Buffer); + LsapFreeHeap(AuthenticatingAuthority); } + /* Free the machine name */ if (MachineName != NULL) { + if (MachineName->Buffer != NULL) + LsapFreeHeap(MachineName->Buffer); + LsapFreeHeap(MachineName); } return Status;