[LSASRV]
authorEric Kohl <eric.kohl@reactos.org>
Sun, 5 May 2013 00:39:58 +0000 (00:39 +0000)
committerEric Kohl <eric.kohl@reactos.org>
Sun, 5 May 2013 00:39:58 +0000 (00:39 +0000)
Free additional data returned by calls to LsaApLogonUser/Ex/2.

svn path=/trunk/; revision=58933

reactos/dll/win32/lsasrv/authpackage.c

index a5af21f..04d2372 100644 (file)
@@ -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;