MdeModulePkg: Fix assert in iSCSI.

The bug is caused by using already freed memory.
If there is already an attempt and execute
'reconnect -r' command, all the ConfigFormEntry structure
will be freed in IScsiDriverBindingStop, but the
mCallbackInfo->Current is not configured as null and
this pointer will be used again in IScsiFormExtractConfig.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
This commit is contained in:
Zhang Lubo 2016-12-01 14:57:38 +08:00 committed by Jiaxin Wu
parent 854c6b80dc
commit 5a066b87bd
1 changed files with 1 additions and 0 deletions

View File

@ -1076,6 +1076,7 @@ IScsiConfigUpdateForm (
mNumberOfIScsiDevices--;
RemoveEntryList (&ConfigFormEntry->Link);
FreePool (ConfigFormEntry);
mCallbackInfo->Current = NULL;
}
//
// Allocate space for creation of Buffer