summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/hdd/src/wlan_hdd_main.c4
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();