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
This commit is contained in:
Wu Jiaxin 2013-10-29 08:51:16 +00:00 committed by jiaxinwu
parent a93b0e3f68
commit 25a516ab1a
1 changed files with 1 additions and 2 deletions

View File

@ -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);