Re: [PATCH v2] platform/x86/amd: Fix memory leak in wbrf_record()

From: Zilin Guan
Date: Sun Jan 04 2026 - 00:32:59 EST


On Sat, Jan 03, 2026 at 02:16:12PM +0100, Markus Elfring wrote:
> …> +++ b/drivers/platform/x86/amd/wbrf.c
> > @@ -39,11 +39,11 @@ static const guid_t wifi_acpi_dsm_guid =
> > */
> > static BLOCKING_NOTIFIER_HEAD(wbrf_chain_head);
> >
> > +DEFINE_FREE(acpi_object, union acpi_object *, if (_T) ACPI_FREE(_T))
> > +
> > static int wbrf_record(struct acpi_device *adev, uint8_t action, struct wbrf_ranges_in_out *in)
> > {
>
>
> Is there a need to move such a special macro call into an other source (or header) file?
>
> Regards,
> Markus

Currently, this helper is only utilized in this function. I believe
keeping it local is appropriate for this bug fix. We can move it to a
generic header if more use cases arise in the future.

Regards,
Zilin Guan