https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4885c34fa8007d8ce2295e...
commit 4885c34fa8007d8ce2295e83637b389920e5241d Author: Mark Jansen mark.jansen@reactos.org AuthorDate: Sat Mar 20 00:28:07 2021 +0100 Commit: Mark Jansen mark.jansen@reactos.org CommitDate: Sat Mar 20 00:28:07 2021 +0100
[SYSSETUP] SamQueryInformationUser expects a pointer --- dll/win32/syssetup/security.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/dll/win32/syssetup/security.c b/dll/win32/syssetup/security.c index ffe73bbe336..eb505ffd3df 100644 --- a/dll/win32/syssetup/security.c +++ b/dll/win32/syssetup/security.c @@ -1154,7 +1154,7 @@ EnableAccount( { INFCONTEXT InfContext; SAM_HANDLE UserHandle = NULL; - USER_CONTROL_INFORMATION ControlInfo; + PUSER_CONTROL_INFORMATION ControlInfo = NULL; INT nValue = 0; NTSTATUS Status;
@@ -1195,22 +1195,25 @@ EnableAccount(
if (nValue == 0) { - ControlInfo.UserAccountControl |= USER_ACCOUNT_DISABLED; + ControlInfo->UserAccountControl |= USER_ACCOUNT_DISABLED; } else { - ControlInfo.UserAccountControl &= ~USER_ACCOUNT_DISABLED; + ControlInfo->UserAccountControl &= ~USER_ACCOUNT_DISABLED; }
Status = SamSetInformationUser(UserHandle, UserControlInformation, - (PVOID)&ControlInfo); + ControlInfo); if (!NT_SUCCESS(Status)) { DPRINT1("SamSetInformationUser() failed (Status: 0x%08lx)\n", Status); }
done: + if (ControlInfo != NULL) + SamFreeMemory(ControlInfo); + if (UserHandle != NULL) SamCloseHandle(UserHandle); }