mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 11:33:35 +00:00
allocate LogFileName and HiveFileName from paged pool
svn path=/trunk/; revision=16692
This commit is contained in:
parent
9f2bf70ddb
commit
648f859ea2
2 changed files with 9 additions and 8 deletions
|
@ -196,12 +196,12 @@ CmImportSystemHive(PCHAR ChunkBase,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set the hive filename */
|
/* Set the hive filename */
|
||||||
RtlpCreateUnicodeString (&RegistryHive->HiveFileName,
|
RtlCreateUnicodeString (&RegistryHive->HiveFileName,
|
||||||
SYSTEM_REG_FILE, NonPagedPool);
|
SYSTEM_REG_FILE);
|
||||||
|
|
||||||
/* Set the log filename */
|
/* Set the log filename */
|
||||||
RtlpCreateUnicodeString (&RegistryHive->LogFileName,
|
RtlCreateUnicodeString (&RegistryHive->LogFileName,
|
||||||
SYSTEM_LOG_FILE, NonPagedPool);
|
SYSTEM_LOG_FILE);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -858,8 +858,8 @@ CmiInitNonVolatileRegistryHive (PREGISTRY_HIVE RegistryHive,
|
||||||
RegistryHive, Filename);
|
RegistryHive, Filename);
|
||||||
|
|
||||||
/* Duplicate Filename */
|
/* Duplicate Filename */
|
||||||
Status = RtlpCreateUnicodeString(&RegistryHive->HiveFileName,
|
Status = RtlCreateUnicodeString(&RegistryHive->HiveFileName,
|
||||||
Filename, NonPagedPool);
|
Filename);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT("RtlpCreateUnicodeString() failed (Status %lx)\n", Status);
|
DPRINT("RtlpCreateUnicodeString() failed (Status %lx)\n", Status);
|
||||||
|
@ -869,8 +869,9 @@ CmiInitNonVolatileRegistryHive (PREGISTRY_HIVE RegistryHive,
|
||||||
/* Create log file name */
|
/* Create log file name */
|
||||||
RegistryHive->LogFileName.Length = (wcslen(Filename) + 4) * sizeof(WCHAR);
|
RegistryHive->LogFileName.Length = (wcslen(Filename) + 4) * sizeof(WCHAR);
|
||||||
RegistryHive->LogFileName.MaximumLength = RegistryHive->LogFileName.Length + sizeof(WCHAR);
|
RegistryHive->LogFileName.MaximumLength = RegistryHive->LogFileName.Length + sizeof(WCHAR);
|
||||||
RegistryHive->LogFileName.Buffer = ExAllocatePool(NonPagedPool,
|
RegistryHive->LogFileName.Buffer = ExAllocatePoolWithTag(PagedPool,
|
||||||
RegistryHive->LogFileName.MaximumLength);
|
RegistryHive->LogFileName.MaximumLength,
|
||||||
|
TAG('U', 'S', 'T', 'R'));
|
||||||
if (RegistryHive->LogFileName.Buffer == NULL)
|
if (RegistryHive->LogFileName.Buffer == NULL)
|
||||||
{
|
{
|
||||||
RtlFreeUnicodeString(&RegistryHive->HiveFileName);
|
RtlFreeUnicodeString(&RegistryHive->HiveFileName);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue