mirror of https://github.com/acidanthera/audk.git
ShellPkg/UefiShellBcfgCommandLib: Handle memory allocation failure
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
This commit is contained in:
parent
aa3276c171
commit
5945813f69
|
@ -2,7 +2,7 @@
|
|||
Main file for BCFG command.
|
||||
|
||||
(C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@ -554,7 +554,7 @@ BcfgAdd(
|
|||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_SET_VAR_FAIL), gShellBcfgHiiHandle, L"bcfg", OptionStr);
|
||||
} else {
|
||||
NewOrder = AllocateZeroPool ((OrderCount + 1) * sizeof (NewOrder[0]));
|
||||
ASSERT(NewOrder != NULL);
|
||||
if (NewOrder != NULL) {
|
||||
CopyMem (NewOrder, CurrentOrder, (OrderCount) * sizeof (NewOrder[0]));
|
||||
|
||||
//
|
||||
|
@ -583,6 +583,7 @@ BcfgAdd(
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
//If always Free FilePath, will free devicepath in system when use "addh"
|
||||
|
|
Loading…
Reference in New Issue