summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVisweswara Tanuku <vtanuku@codeaurora.org>2017-03-03 11:01:52 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2017-03-10 02:38:43 -0800
commitfe00db095de75cbf4e39bae22c8c2481526c9457 (patch)
treeb46661916e85a201b5b1ab43e5c6307f474d9b9d
parentbc08d344be886dea0da4d61387fa0c27663ca501 (diff)
qcacld-2.0: Avoid multiple allocations for trace buffer
Global trace_buffer is being allocated multiple times in probe, whenever a sdio/usb device is inserted. But memory is being freed only once upon driver exit. This leads to memory leak. Deallocate trace buffer when device is removed CRs-Fixed: 2012750 Change-Id: I18f99fac4c8431f0701964811d29770f04553937
-rw-r--r--CORE/HDD/src/wlan_hdd_main.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index 7e5007221caa..3eecb5e1e872 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -13523,6 +13523,10 @@ void hdd_wlan_exit(hdd_context_t *pHddCtx)
*/
hdd_stop_all_adapters( pHddCtx );
+#ifdef QCA_PKT_PROTO_TRACE
+ if (VOS_FTM_MODE != hdd_get_conparam())
+ vos_pkt_proto_trace_close();
+#endif
//Stop all the modules
vosStatus = vos_stop( pVosContext );
@@ -16645,11 +16649,6 @@ static void hdd_driver_exit(void)
hif_unregister_driver();
vos_preClose( &pVosContext );
-#ifdef QCA_PKT_PROTO_TRACE
- if (VOS_FTM_MODE != hdd_get_conparam())
- vos_pkt_proto_trace_close();
-#endif /* QCA_PKT_PROTO_TRACE */
-
#ifdef TIMER_MANAGER
vos_timer_exit();
#endif