summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRajeev Kumar <rajekuma@codeaurora.org>2017-08-18 13:48:47 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2017-08-21 01:13:45 -0700
commitfbeb02590965619b6b1a26e654ce5d8124bbd82a (patch)
tree03325a3fa21c76934cd75c2f4e8816da4135fa1e
parentdeafef0a1364ef3b7504f3703d6c47c0ab45cfe2 (diff)
qcacld-3.0: Free target_hw_name memory if its already allocated
Free target_hw_name memory if its already allocated. Change-Id: I92d0c74384dc7ba2d920287fc1266fc4750289aa CRs-Fixed: 2095426
-rw-r--r--core/hdd/src/wlan_hdd_main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index b8231f34d880..0d751a8fc65d 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -1906,6 +1906,10 @@ static void hdd_update_hw_sw_info(hdd_context_t *hdd_ctx)
&target_hw_name);
target_hw_name_len = strlen(target_hw_name) + 1;
+
+ if (hdd_ctx->target_hw_name)
+ qdf_mem_free(hdd_ctx->target_hw_name);
+
hdd_ctx->target_hw_name = qdf_mem_malloc(target_hw_name_len);
if (hdd_ctx->target_hw_name)