Explorar o código

qcacld-3.0: Fix delayed work leak in hdd_context_create

Delayed work leak is observed when hdd_wlan_startup failed in
__hdd_soc_probe. It will call hdd_context_destroy for cleanup, but
the delayed work created in hdd_context_create is destroyed in
hdd_wlan_exit.

To fix this leak, move this from hdd_wlan_exit to hdd_context_destroy

Change-Id: I237de3695e8915dee9ba085c5d3679a3b438d323
CRs-Fixed: 2432748
Min Liu %!s(int64=6) %!d(string=hai) anos
pai
achega
4710404f78
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      core/hdd/src/wlan_hdd_main.c

+ 1 - 1
core/hdd/src/wlan_hdd_main.c

@@ -7332,6 +7332,7 @@ void hdd_context_destroy(struct hdd_context *hdd_ctx)
 	hdd_ctx->config = NULL;
 	cfg_release();
 
+	qdf_delayed_work_destroy(&hdd_ctx->psoc_idle_timeout_work);
 	wiphy_free(hdd_ctx->wiphy);
 }
 
@@ -7466,7 +7467,6 @@ void hdd_wlan_exit(struct hdd_context *hdd_ctx)
 	}
 
 	hdd_exit_netlink_services(hdd_ctx);
-	qdf_delayed_work_destroy(&hdd_ctx->psoc_idle_timeout_work);
 #ifdef FEATURE_WLAN_CH_AVOID
 	mutex_destroy(&hdd_ctx->avoid_freq_lock);
 #endif