From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by ml01.01.org (Postfix) with ESMTP id 5ECFD1A1E11 for ; Mon, 1 Aug 2016 01:40:07 -0700 (PDT) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP; 01 Aug 2016 01:40:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,454,1464678000"; d="scan'208";a="148594440" Received: from shwdeopenpsi116.ccr.corp.intel.com ([10.239.9.22]) by fmsmga004.fm.intel.com with ESMTP; 01 Aug 2016 01:40:06 -0700 From: Zhang Lubo To: edk2-devel@lists.01.org Cc: Fu Siyuan , Ye Ting , Wu Jiaxin Date: Mon, 1 Aug 2016 16:38:01 +0800 Message-Id: <1470040681-31668-1-git-send-email-lubo.zhang@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.1 Subject: [patch] NetworkPkg: Fix assert issue in iSCSI driver X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2016 08:40:07 -0000 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 Cc: Fu Siyuan Cc: Ye Ting Cc: Wu Jiaxin --- NetworkPkg/IScsiDxe/IScsiMisc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NetworkPkg/IScsiDxe/IScsiMisc.c b/NetworkPkg/IScsiDxe/IScsiMisc.c index deebf5d..a39c268 100644 --- a/NetworkPkg/IScsiDxe/IScsiMisc.c +++ b/NetworkPkg/IScsiDxe/IScsiMisc.c @@ -898,10 +898,12 @@ IScsiCleanDriverData ( EXIT: gBS->CloseEvent (Private->ExitBootServiceEvent); + mCallbackInfo->Current = NULL; + FreePool (Private); return Status; } /** -- 1.9.5.msysgit.1