]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/IpSecDxe/IpSecConfigImpl.c
NetworkPkg: Remove ASSERT and use error handling in IpSecDxe
[mirror_edk2.git] / NetworkPkg / IpSecDxe / IpSecConfigImpl.c
index e1b24e4355574e0637bdd7fa34917ad050b949df..cfee978d949831c97233e7fbc44130ccbdcd790f 100644 (file)
@@ -2175,7 +2175,10 @@ IpSecGetVariable (
   VariableNameLength  = StrLen (VariableName);\r
   VariableNameISize   = (VariableNameLength + 5) * sizeof (CHAR16);\r
   VariableNameI       = AllocateZeroPool (VariableNameISize);\r
-  ASSERT (VariableNameI != NULL);\r
+  if (VariableNameI == NULL) {\r
+    Status = EFI_OUT_OF_RESOURCES;\r
+    goto ON_EXIT;\r
+  }\r
   \r
   //\r
   // Construct the varible name of ipsecconfig meta data.\r