diff options
| author | Arunk Khandavalli <akhandav@codeaurora.org> | 2017-09-08 12:12:10 +0530 |
|---|---|---|
| committer | snandini <snandini@codeaurora.org> | 2017-09-11 09:23:15 -0700 |
| commit | cf398263f03c335a8ab47def959e5c40fbc18d5d (patch) | |
| tree | 587b735bb997005e374a89cbb012efceba374b55 | |
| parent | 6be5244232865f3b44476e1bcc898bf8cb10bd95 (diff) | |
qcacld-3.0: Move the freeing of tartget memory module_exit to stop_modules
In the Loadonce unload never driver the modules_start and modules_stop
happen multiple times and presently the memory for target_name is
allocated multiple times during the start_modules but freed only
once during the module_exit, so when the driver is unloaded
this can result in a crash.
Moving this to stop_modules will help in freeing this everytimg.
Change-Id: I87a92c8b411fb0ae148a293d74e6914246b88014
CRs-Fixed: 2107392
| -rw-r--r-- | core/hdd/src/wlan_hdd_main.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 0d86dc67af91..b04ddc731746 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -5894,7 +5894,6 @@ static void hdd_wlan_exit(hdd_context_t *hdd_ctx) wlan_hdd_deinit_chan_info(hdd_ctx); hdd_exit_netlink_services(hdd_ctx); mutex_destroy(&hdd_ctx->iface_change_lock); - qdf_mem_free(hdd_ctx->target_hw_name); hdd_context_destroy(hdd_ctx); } @@ -9546,6 +9545,9 @@ int hdd_wlan_stop_modules(hdd_context_t *hdd_ctx, bool ftm_mode) ret = -EINVAL; } + if (hdd_ctx->target_hw_name) + qdf_mem_free(hdd_ctx->target_hw_name); + hdd_hif_close(hif_ctx); ol_cds_free(); |
