NetworkPkg: Replace ASSERT with error handling in Http boot and IScsi
v2: *Fix some memory leak issue. This patch is used to replace ASSERT with error handling in Http boot Driver and IScsi driver. Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Reviewed-By: Wu Jiaxin <jiaxin.wu@intel.com>
This commit is contained in:
@@ -1006,6 +1006,7 @@ IScsiDhcpIsConfigured (
|
||||
|
||||
@retval EFI_SUCCESS The configuration data is retrieved.
|
||||
@retval EFI_NOT_FOUND This iSCSI driver is not configured yet.
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -1292,7 +1293,9 @@ IScsiGetConfigData (
|
||||
mPrivate->PortString,
|
||||
NULL
|
||||
);
|
||||
ASSERT (AttemptConfigData->AttemptTitleHelpToken != 0);
|
||||
if (AttemptConfigData->AttemptTitleHelpToken == 0) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
//
|
||||
// Record the attempt in global link list.
|
||||
|
Reference in New Issue
Block a user