NetworkPkg: Remove ASSERT and use error handling in IpSecDxe
This patch is used to refine the code by removing ASSERT and using error handling in IpSecDxe driver. Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Zhang Lubo <lubo.zhang@intel.com> Cc: Yao Jiewen <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com>
This commit is contained in:
@@ -2175,7 +2175,10 @@ IpSecGetVariable (
|
||||
VariableNameLength = StrLen (VariableName);
|
||||
VariableNameISize = (VariableNameLength + 5) * sizeof (CHAR16);
|
||||
VariableNameI = AllocateZeroPool (VariableNameISize);
|
||||
ASSERT (VariableNameI != NULL);
|
||||
if (VariableNameI == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto ON_EXIT;
|
||||
}
|
||||
|
||||
//
|
||||
// Construct the varible name of ipsecconfig meta data.
|
||||
|
Reference in New Issue
Block a user