summaryrefslogtreecommitdiffstats
path: root/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrFileUtil.c
diff options
context:
space:
mode:
authorWang, Fan <fan.wang@intel.com>2019-02-28 17:10:09 +0800
committerJiaxin Wu <Jiaxin.wu@intel.com>2019-03-01 10:38:51 +0800
commita6c63ee6d5d842bb8c4663c5140ae2c8e7360cac (patch)
tree9bf091fb7c11d91959cfb13cdddf137031e44d88 /NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrFileUtil.c
parent407f5a0571d186bbfa0ac2e46ce63f4701063b86 (diff)
downloadedk2-a6c63ee6d5d842bb8c4663c5140ae2c8e7360cac.tar.gz
edk2-a6c63ee6d5d842bb8c4663c5140ae2c8e7360cac.tar.bz2
edk2-a6c63ee6d5d842bb8c4663c5140ae2c8e7360cac.zip
NetworkPkg: Fix Duplicate FreePool Error in WCM
* REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1577 In WiFi Connection Manager scan process, the result received from WiFi device driver will be freed twice, and will cause unexpected errors, and even system crash. This issue also exists in some other places potentially, this patch is to fix these issues and also add Timer Cancelling before Close to avoid potential NULL reference. Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Wang Fan <fan.wang@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
Diffstat (limited to 'NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrFileUtil.c')
-rw-r--r--NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrFileUtil.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrFileUtil.c b/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrFileUtil.c
index 6db1626f2d..0224823431 100644
--- a/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrFileUtil.c
+++ b/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrFileUtil.c
@@ -253,6 +253,7 @@ UpdatePage(
if (Private->FileContext->FileName != NULL) {
FreePool (Private->FileContext->FileName);
+ Private->FileContext->FileName = NULL;
}
Private->FileContext->FileName = FileName;