Re: [PATCH ath-next] wifi: ath11k: fix reg_info_store leak in ath11k_service_ready_ext_event()

From: Baochen Qiang

Date: Wed Aug 19 2026 - 07:04:19 EST




On 8/18/2026 7:46 AM, Jeff Johnson wrote:
> Currently, while processing the WMI Service Ready Ext event, the iterator
> in ath11k_service_ready_ext_event() can dispatch the HAL Regulatory
> Capabilities handler ath11k_wmi_tlv_ext_soc_hal_reg_caps_parse() which can
> allocate ab->reg_info_store.
>
> If a subsequent failure occurs during iteration, the ab->reg_info_store
> allocation is leaked.
>
> Directly free and clear the pointer on the error path.
>
> Note that the normal cleanup function ath11k_reg_free() cannot be used
> since other regulatory-related fields are not yet populated at this point.
>
> Compile tested only.
>
> Fixes: 7004bdceef60 ("wifi: ath11k: store cur_regulatory_info for each radio")
> Assisted-by: Claude:claude-sonnet-4-6
> Signed-off-by: Jeff Johnson <jeff.johnson@xxxxxxxxxxxxxxxx>

Reviewed-by: Baochen Qiang <baochen.qiang@xxxxxxxxxxxxxxxx>