summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBala Venkatesh <bjavvaji@codeaurora.org>2017-11-23 15:13:56 +0530
committersnandini <snandini@codeaurora.org>2017-11-24 04:32:27 -0800
commit7a357019d07f274e63dd6f7ed7ec241cdeb2769f (patch)
tree5939c3b34877ae90f7cd3beffe4ef540f2515527
parentb9232fe76c13c65008adeefa90287b255f3a8ad7 (diff)
qcacld-3.0: Fix memory leak by flushing roc work queue before hdd wlan stop modules
Calling cds_flush_work function before hdd_wlan_stop_modules fixes the memory leakes in hdd_wlan_exit function. Change-Id: I7914260a4b19a62273116ac18441fd3fee6f1d93 CRs-Fixed: 2147456
-rw-r--r--core/hdd/src/wlan_hdd_main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index f0fc57f99dbb..d8d51b4a6bc4 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -5993,6 +5993,9 @@ static void hdd_wlan_exit(hdd_context_t *hdd_ctx)
unregister_netdevice_notifier(&hdd_netdev_notifier);
+ /* Free up RoC request queue and flush workqueue */
+ cds_flush_work(&hdd_ctx->roc_req_work);
+
hdd_wlan_stop_modules(hdd_ctx, false);
hdd_driver_memdump_deinit();
@@ -6030,8 +6033,6 @@ static void hdd_wlan_exit(hdd_context_t *hdd_ctx)
hdd_close_all_adapters(hdd_ctx, false);
hdd_ipa_cleanup(hdd_ctx);
- /* Free up RoC request queue and flush workqueue */
- cds_flush_work(&hdd_ctx->roc_req_work);
wlansap_global_deinit();
/*