forked from xt-sys/exectos
There is no need to allocate so much memory
This commit is contained in:
@@ -269,11 +269,11 @@ BlpParseCommandLine(VOID)
|
||||
if(Status == STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Allocate more memory for option name */
|
||||
Status = BlAllocateMemoryPool(sizeof(PWCHAR) * (KeyLength + 1), (PVOID*)&Option->Name);
|
||||
Status = BlAllocateMemoryPool(sizeof(WCHAR) * (KeyLength + 1), (PVOID*)&Option->Name);
|
||||
if(Status == STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Allocate even more memory for option value */
|
||||
Status = BlAllocateMemoryPool(sizeof(PWCHAR) * (ValueLength + 1), (PVOID*)&Option->Value);
|
||||
Status = BlAllocateMemoryPool(sizeof(WCHAR) * (ValueLength + 1), (PVOID*)&Option->Value);
|
||||
}
|
||||
}
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
@@ -390,7 +390,7 @@ BlpParseConfigFile(IN CONST PCHAR RawConfig,
|
||||
if(Status == STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Allocate more memory for section name */
|
||||
Status = BlAllocateMemoryPool(sizeof(PWCHAR) * (SectionLength + 1), (PVOID*)&Section->SectionName);
|
||||
Status = BlAllocateMemoryPool(sizeof(WCHAR) * (SectionLength + 1), (PVOID*)&Section->SectionName);
|
||||
}
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
@@ -460,11 +460,11 @@ BlpParseConfigFile(IN CONST PCHAR RawConfig,
|
||||
if(Status == STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Allocate more memory for option name */
|
||||
Status = BlAllocateMemoryPool(sizeof(PWCHAR) * (KeyLength + 1), (PVOID*)&Option->Name);
|
||||
Status = BlAllocateMemoryPool(sizeof(WCHAR) * (KeyLength + 1), (PVOID*)&Option->Name);
|
||||
if(Status == STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Allocate even more memory for option value */
|
||||
Status = BlAllocateMemoryPool(sizeof(PWCHAR) * (ValueLength + 1), (PVOID*)&Option->Value);
|
||||
Status = BlAllocateMemoryPool(sizeof(WCHAR) * (ValueLength + 1), (PVOID*)&Option->Value);
|
||||
}
|
||||
}
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
|
Reference in New Issue
Block a user