]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg: Fix assert in iSCSI.
authorZhang Lubo <lubo.zhang@intel.com>
Thu, 1 Dec 2016 06:57:38 +0000 (14:57 +0800)
committerJiaxin Wu <jiaxin.wu@intel.com>
Wed, 7 Dec 2016 08:13:11 +0000 (16:13 +0800)
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>
MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c

index 77ccd6717835a355a20f5e797445b60400f9964d..ea727af1ffc3e2585845ae81b3d1a160d2d1b810 100644 (file)
@@ -1076,6 +1076,7 @@ IScsiConfigUpdateForm (
     mNumberOfIScsiDevices--;\r
     RemoveEntryList (&ConfigFormEntry->Link);\r
     FreePool (ConfigFormEntry);\r
+    mCallbackInfo->Current = NULL;\r
   }\r
   //\r
   // Allocate space for creation of Buffer\r