Re: [PATCH] net: wireless: fix uninitialized pointers with free attr

From: Johannes Berg

Date: Wed Nov 05 2025 - 07:19:50 EST


On Wed, 2025-11-05 at 17:20 +0530, Ally Heev wrote:
> Uninitialized pointers with `__free` attribute can cause undefined
> behaviour as the memory assigned(randomly) to the pointer is freed
> automatically when the pointer goes out of scope
>
> wireless doesn't have any bugs related to this as of now, but
> it is better to initialize and assign pointers with `__free` attr
> in one statement to ensure proper scope-based cleanup


Yeah but ... eww. Please read things like coding style guidelines before
you post patches.

johannes