ath6kl_usb_probe() creates the core with ath6kl_core_create(), which allocates the wiphy and the per-station aggregation state in ath6kl_cfg80211_create(). These are released by ath6kl_core_destroy() only. ath6kl_usb_device_detached() calls ath6kl_core_cleanup() and then frees the HIF private data with ath6kl_usb_destroy(), so the allocation made at probe time is never released when the USB device is detached. The SDIO counterpart, ath6kl_sdio_remove(), already calls ath6kl_core_destroy() right after ath6kl_core_cleanup(). Do the same in the USB detach path. Fixes: 241b128b6b69 ("ath6kl: add back beginnings of USB support") Cc: stable@vger.kernel.org Assisted-by: DeepSeek-V4.1-Flash and OpenAI Codex Signed-off-by: Wentao Liang --- drivers/net/wireless/ath/ath6kl/usb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/ath/ath6kl/usb.c b/drivers/net/wireless/ath/ath6kl/usb.c index 945984c3dbe6..217397dd545f 100644 --- a/drivers/net/wireless/ath/ath6kl/usb.c +++ b/drivers/net/wireless/ath/ath6kl/usb.c @@ -690,6 +690,7 @@ static void ath6kl_usb_device_detached(struct usb_interface *interface) /* Delay to wait for the target to reboot */ mdelay(20); ath6kl_core_cleanup(ar_usb->ar); + ath6kl_core_destroy(ar_usb->ar); ath6kl_usb_destroy(ar_usb); } -- 2.34.1