Author: weiden
Date: Tue Dec 11 21:56:55 2007
New Revision: 31161
URL:
http://svn.reactos.org/svn/reactos?rev=31161&view=rev
Log:
Fix a memory leak in AccpLookupSidByName
Modified:
trunk/reactos/dll/win32/ntmarta/ntmarta.c
Modified: trunk/reactos/dll/win32/ntmarta/ntmarta.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ntmarta/ntmarta.…
==============================================================================
--- trunk/reactos/dll/win32/ntmarta/ntmarta.c (original)
+++ trunk/reactos/dll/win32/ntmarta/ntmarta.c Tue Dec 11 21:56:55 2007
@@ -366,7 +366,10 @@
return LsaNtStatusToWinError(Status);
if (TranslatedSid->Use == SidTypeUnknown || TranslatedSid->Use ==
SidTypeInvalid)
- return LsaNtStatusToWinError(STATUS_NONE_MAPPED); /* FIXME- what error code? */
+ {
+ Ret = LsaNtStatusToWinError(STATUS_NONE_MAPPED); /* FIXME- what error code? */
+ goto Cleanup;
+ }
SidLen = GetLengthSid(TranslatedSid->Sid);
ASSERT(SidLen != 0);
@@ -387,6 +390,7 @@
else
Ret = ERROR_NOT_ENOUGH_MEMORY;
+Cleanup:
LsaFreeMemory(ReferencedDomains);
LsaFreeMemory(TranslatedSid);