diff options
| author | wadesong <wadesong@codeaurora.org> | 2016-10-17 18:15:37 +0800 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2016-10-18 13:31:07 +0530 |
| commit | b0c45166b16d670d7f414d2ea8ab29decd467399 (patch) | |
| tree | dfe587319fa5edb8835b52f256eaad6df29b329c | |
| parent | c1a7c23da816499b5ba71d4360fce9240772fa3a (diff) | |
qcacld-2.0: Fix memory leak during wlan driver startup
2.4G channel buffer freeing code path may be by-passed when
handling the netlink service initialization failure
Change-Id: I1195f760cf5f9243f71d8a62ec3ad818c998094b
CRs-Fixed: 1078377
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_main.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c index 34b95d6ce84e..0268797bc8ef 100644 --- a/CORE/HDD/src/wlan_hdd_main.c +++ b/CORE/HDD/src/wlan_hdd_main.c @@ -14876,7 +14876,7 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc) vos_set_multicast_logging(pHddCtx->cfg_ini->multicast_host_fw_msgs); if (wlan_hdd_logging_sock_activate_svc(pHddCtx) < 0) - goto err_config; + goto err_sock_activate; /* * Update VOS trace levels based upon the code. The multicast log @@ -14932,7 +14932,7 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc) /* Initialize the nlink service */ if (wlan_hdd_nl_init(pHddCtx) != 0) { hddLog(LOGP, FL("nl_srv_init failed")); - goto err_config; + goto err_sock_activate; } vos_set_radio_index(pHddCtx->radio_index); @@ -15740,7 +15740,6 @@ err_ipa_cleanup: err_wiphy_unregister: wiphy_unregister(wiphy); - wlan_hdd_cfg80211_deinit(wiphy); err_vosclose: status = vos_sched_close( pVosContext ); @@ -15773,6 +15772,10 @@ err_free_ftm_open: wlan_hdd_logging_sock_deactivate_svc(pHddCtx); err_nl_srv: nl_srv_exit(); + +err_sock_activate: + wlan_hdd_cfg80211_deinit(wiphy); + err_config: vos_mem_free(pHddCtx->cfg_ini); pHddCtx->cfg_ini= NULL; |
