Thread (3 messages) 3 messages, 3 authors, 2026-01-01

Re: [PATCH] arm: fix uninitialized pointers with free attr

From: Cristian Marussi <cristian.marussi@arm.com>
Date: 2025-11-13 10:56:57
Also in: arm-scmi, lkml

On Wed, Nov 05, 2025 at 07:37:52PM +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
Hi,
arm 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
Thanks for this, I agree that it is better to stick to the intended
usage-pattern in order to avoid future issues when the nearby code
changes; for this reason I would also NOT add a Fix tag (...like you
effectively did NOT...just to clarify why :P)

Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>

Thanks,
Cristian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help