diff options
| author | Dustin Brown <dustinb@codeaurora.org> | 2018-01-25 17:37:25 +0530 |
|---|---|---|
| committer | snandini <snandini@codeaurora.org> | 2018-01-31 04:43:03 -0800 |
| commit | 373b5f34daee4fb0b75e76bc1fa0d107740d2e64 (patch) | |
| tree | c7744b395f4ecf93b6cf272ac03fa951211bb898 | |
| parent | b66a9f997986525d316ecd459688c9a0842ae97b (diff) | |
qcacld-3.0: Allocate and free memory for chan_info correctly
Memory for chan_info is allocated in hdd_wlan_startup() and
freed in hdd_wlan_exit(). When device boots up, memory gets
allocated for chan_info but if interface timer expires, all
the modules are closed and memory is checked for any leaks.
As memory for chan_info is freed in hdd_wlan_exit() so memory
for chan_info is still present and hence assert in
qdf_mem_check_for_leaks().
Allocate memory for chan_info in hdd_features_init() and free
it in hdd_features_deinit().
Change-Id: Ia8944da16a776d4de4fdfbb10b605ebd2b60f0b6
CRs-Fixed: 2178435
| -rw-r--r-- | core/hdd/src/wlan_hdd_main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index f2b4ebc49137..9e741496c331 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -6289,7 +6289,6 @@ static void hdd_wlan_exit(hdd_context_t *hdd_ctx) hdd_lpass_notify_stop(hdd_ctx); } - wlan_hdd_deinit_chan_info(hdd_ctx); hdd_exit_netlink_services(hdd_ctx); mutex_destroy(&hdd_ctx->iface_change_lock); hdd_context_destroy(hdd_ctx); @@ -10040,6 +10039,8 @@ static int hdd_features_init(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter) if (ret) goto deregister_cb; + wlan_hdd_init_chan_info(hdd_ctx); + EXIT(); return 0; @@ -10063,6 +10064,7 @@ out: */ static void hdd_features_deinit(hdd_context_t *hdd_ctx) { + wlan_hdd_deinit_chan_info(hdd_ctx); wlan_hdd_tsf_deinit(hdd_ctx); } @@ -10631,8 +10633,6 @@ int hdd_wlan_startup(struct device *dev) goto err_stop_modules; } - wlan_hdd_init_chan_info(hdd_ctx); - ret = hdd_wiphy_init(hdd_ctx); if (ret) { hdd_err("Failed to initialize wiphy: %d", ret); |
