Browse Source

qcacld-3.0: Fix memory leaks when cds_open fails

When cds_open fails, several cleanup actions are missed.
cds_shutdown_notifier_purge
hdd_green_ap_deinit
wlan_hdd_deinit_tx_rx_histogram

Change-Id: I9812b26636b1fd82320de323538777ac048ea824
CRs-Fixed: 1089946
Houston Hoffman 8 years ago
parent
commit
47a4a05cfa
2 changed files with 3 additions and 0 deletions
  1. 1 0
      core/cds/src/cds_api.c
  2. 2 0
      core/hdd/src/wlan_hdd_main.c

+ 1 - 0
core/cds/src/cds_api.c

@@ -414,6 +414,7 @@ err_bmi_close:
 
 err_sched_close:
 	cds_sched_close(gp_cds_context);
+	cds_shutdown_notifier_purge();
 
 err_msg_queue:
 	cds_mq_deinit(&gp_cds_context->freeVosMq);

+ 2 - 0
core/hdd/src/wlan_hdd_main.c

@@ -8173,10 +8173,12 @@ err_stop_modules:
 	}
 
 err_exit_nl_srv:
+	hdd_green_ap_deinit(hdd_ctx);
 	hdd_exit_netlink_services(hdd_ctx);
 
 	cds_deinit_ini_config();
 err_hdd_free_context:
+	wlan_hdd_deinit_tx_rx_histogram(hdd_ctx);
 	qdf_mc_timer_destroy(&hdd_ctx->iface_change_timer);
 	mutex_destroy(&hdd_ctx->iface_change_lock);
 	hdd_context_destroy(hdd_ctx);