Unverified Commit e958f17a authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!6267 wifi: brcmfmac: Fix use-after-free bug in brcmf_cfg80211_detach

parents b05f2de3 cc4069fb
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -790,8 +790,7 @@ s32 brcmf_notify_escan_complete(struct brcmf_cfg80211_info *cfg,
	scan_request = cfg->scan_request;
	cfg->scan_request = NULL;

	if (timer_pending(&cfg->escan_timeout))
		del_timer_sync(&cfg->escan_timeout);
	timer_delete_sync(&cfg->escan_timeout);

	if (fw_abort) {
		/* Do a scan abort to stop the driver's scan engine */
@@ -7674,6 +7673,7 @@ void brcmf_cfg80211_detach(struct brcmf_cfg80211_info *cfg)
	brcmf_btcoex_detach(cfg);
	wiphy_unregister(cfg->wiphy);
	wl_deinit_priv(cfg);
	cancel_work_sync(&cfg->escan_timeout_work);
	brcmf_free_wiphy(cfg->wiphy);
	kfree(cfg);
}