summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Network
diff options
context:
space:
mode:
authorWu Jiaxin <jiaxin.wu@intel.com>2013-10-29 08:51:16 +0000
committerjiaxinwu <jiaxinwu@6f19259b-4bc3-4df7-8a09-765794883524>2013-10-29 08:51:16 +0000
commit25a516ab1a9dfccf2b71ec15771e99192c307418 (patch)
tree405ff4d8f5b0ba8effed0f3e20699b1a01bc3f24 /MdeModulePkg/Universal/Network
parenta93b0e3f6895a074b99c8817181dfa6dbc7a4807 (diff)
downloadedk2-25a516ab1a9dfccf2b71ec15771e99192c307418.zip
edk2-25a516ab1a9dfccf2b71ec15771e99192c307418.tar.gz
edk2-25a516ab1a9dfccf2b71ec15771e99192c307418.tar.bz2
Fix a K9 error.Result of GetVariable2() function that may return NULL will be dereferenced.
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com > Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Dong Guo <guo.dong@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14813 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Network')
-rw-r--r--MdeModulePkg/Universal/Network/IScsiDxe/IScsiMisc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiMisc.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiMisc.c
index 16ffec0..2e43b41 100644
--- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiMisc.c
+++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiMisc.c
@@ -656,10 +656,9 @@ IScsiDhcpIsConfigured (
(VOID**)&ConfigDataTmp,
NULL
);
- if (EFI_ERROR (Status)) {
+ if (ConfigDataTmp == NULL || EFI_ERROR (Status)) {
return FALSE;
}
-
if (ConfigDataTmp->Enabled && ConfigDataTmp->InitiatorInfoFromDhcp) {
FreePool (ConfigDataTmp);