]> git.proxmox.com Git - mirror_edk2.git/commitdiff
NetworkPkg: Fix assert issue in iSCSI driver
authorZhang Lubo <lubo.zhang@intel.com>
Mon, 1 Aug 2016 08:33:26 +0000 (16:33 +0800)
committerJiaxin Wu <jiaxin.wu@intel.com>
Thu, 18 Aug 2016 05:54:07 +0000 (13:54 +0800)
The bug is caused by using already freed memory.
If there is already an attempt and execute
'reconnect -r' command, all the AttemptConfig structure
will be freed, 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: Fu Siyuan <siyuan.fu@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
NetworkPkg/IScsiDxe/IScsiMisc.c

index deebf5d9a38751d715440799c7d6cf30a64e6e06..a39c268d655a97ff1099e8b9cccfa49e62e560c2 100644 (file)
@@ -900,6 +900,8 @@ EXIT:
 \r
   gBS->CloseEvent (Private->ExitBootServiceEvent);\r
 \r
+  mCallbackInfo->Current = NULL;\r
+\r
   FreePool (Private);\r
   return Status;\r
 }\r