mirror of
https://github.com/reactos/reactos.git
synced 2025-05-23 11:04:52 +00:00
Merging r37219
svn path=/trunk/; revision=37220
This commit is contained in:
parent
18640a8731
commit
7eff87cf56
4 changed files with 17 additions and 8 deletions
|
@ -109,6 +109,9 @@ InitiateSystemShutdownA(LPSTR lpMachineName,
|
|||
INT LastError;
|
||||
BOOL rv;
|
||||
|
||||
MachineNameW.Buffer = NULL;
|
||||
MessageW.Buffer = NULL;
|
||||
|
||||
if (lpMachineName)
|
||||
{
|
||||
RtlInitAnsiString(&MachineNameA, lpMachineName);
|
||||
|
@ -126,7 +129,7 @@ InitiateSystemShutdownA(LPSTR lpMachineName,
|
|||
Status = RtlAnsiStringToUnicodeString(&MessageW, &MessageA, TRUE);
|
||||
if (STATUS_SUCCESS != Status)
|
||||
{
|
||||
if (MachineNameW.Length)
|
||||
if (MachineNameW.Buffer)
|
||||
{
|
||||
RtlFreeUnicodeString(&MachineNameW);
|
||||
}
|
||||
|
|
|
@ -917,6 +917,8 @@ CreateNestedKey(PHKEY KeyHandle,
|
|||
LocalObjectAttributes.ObjectName = &LocalKeyName;
|
||||
FullNameLength = LocalKeyName.Length / sizeof(WCHAR);
|
||||
|
||||
LocalKeyHandle = NULL;
|
||||
|
||||
/* Remove the last part of the key name and try to create the key again. */
|
||||
while (Status == STATUS_OBJECT_NAME_NOT_FOUND)
|
||||
{
|
||||
|
@ -949,7 +951,8 @@ CreateNestedKey(PHKEY KeyHandle,
|
|||
Length = wcslen (LocalKeyName.Buffer);
|
||||
while (TRUE)
|
||||
{
|
||||
NtClose (LocalKeyHandle);
|
||||
if (LocalKeyHandle)
|
||||
NtClose (LocalKeyHandle);
|
||||
|
||||
LocalKeyName.Buffer[Length] = L'\\';
|
||||
Length = wcslen (LocalKeyName.Buffer);
|
||||
|
@ -2544,7 +2547,7 @@ RegEnumKeyExA (HKEY hKey,
|
|||
}
|
||||
}
|
||||
|
||||
TRACE("Key Namea0 Length %d\n", StringU.Length);
|
||||
/*TRACE("Key Namea0 Length %d\n", StringU.Length);*/ /* BUGBUG could be uninitialized */
|
||||
TRACE("Key Namea1 Length %d\n", NameLength);
|
||||
TRACE("Key Namea Length %d\n", *lpcbName);
|
||||
TRACE("Key Namea %s\n", lpName);
|
||||
|
@ -4685,13 +4688,14 @@ RegSetValueExA (HKEY hKey,
|
|||
{
|
||||
RtlCreateUnicodeStringFromAsciiz (&ValueName,
|
||||
(PSTR)lpValueName);
|
||||
pValueName = (LPWSTR)ValueName.Buffer;
|
||||
}
|
||||
else
|
||||
{
|
||||
pValueName = NULL;
|
||||
ValueName.Buffer = NULL;
|
||||
}
|
||||
|
||||
pValueName = (LPWSTR)ValueName.Buffer;
|
||||
|
||||
if (((dwType == REG_SZ) ||
|
||||
(dwType == REG_MULTI_SZ) ||
|
||||
(dwType == REG_EXPAND_SZ)) &&
|
||||
|
|
|
@ -1252,6 +1252,8 @@ LookupPrivilegeValueA(LPCSTR lpSystemName,
|
|||
RtlCreateUnicodeStringFromAsciiz(&SystemName,
|
||||
(LPSTR)lpSystemName);
|
||||
}
|
||||
else
|
||||
SystemName.Buffer = NULL;
|
||||
|
||||
/* Check the privilege name is not NULL */
|
||||
if (lpName == NULL)
|
||||
|
@ -1263,14 +1265,14 @@ LookupPrivilegeValueA(LPCSTR lpSystemName,
|
|||
RtlCreateUnicodeStringFromAsciiz(&Name,
|
||||
(LPSTR)lpName);
|
||||
|
||||
Result = LookupPrivilegeValueW((lpSystemName != NULL) ? SystemName.Buffer : NULL,
|
||||
Result = LookupPrivilegeValueW(SystemName.Buffer,
|
||||
Name.Buffer,
|
||||
lpLuid);
|
||||
|
||||
RtlFreeUnicodeString(&Name);
|
||||
|
||||
/* Remote system? */
|
||||
if (lpSystemName != NULL)
|
||||
if (SystemName.Buffer != NULL)
|
||||
{
|
||||
RtlFreeUnicodeString(&SystemName);
|
||||
}
|
||||
|
|
|
@ -872,7 +872,7 @@ ReportEventA(IN HANDLE hEventLog,
|
|||
|
||||
HeapFree(GetProcessHeap(),
|
||||
0,
|
||||
wideStrArray);
|
||||
(PVOID)wideStrArray);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue