Re: [PATCH iwlwifi-next v5] wifi: iwlwifi: fix uninitialized pointers with free attribute

From: Krzysztof Kozlowski
Date: Mon Nov 24 2025 - 02:32:08 EST


On 24/11/2025 08:29, Ally Heev wrote:
> Uninitialized pointers with `__free` attribute can cause undefined
> behavior as the memory assigned randomly to the pointer is freed
> automatically when the pointer goes out of scope.
>
> It is better to initialize and assign pointers with `__free` attribute
> in one statement to ensure proper scope-based cleanup
>
> Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> Closes: https://lore.kernel.org/all/aPiG_F5EBQUjZqsl@stanley.mountain/
> Signed-off-by: Ally Heev <allyheev@xxxxxxxxx>
> ---


Reviewed-by: Krzysztof Kozlowski <krzk@xxxxxxxxxx>

Best regards,
Krzysztof