Re: [PATCH] sound/core/seq: Initialize structure pointer to NULL to prevent undefined behavior
From: David Hunter
Date: Sun Oct 05 2025 - 23:55:35 EST
On 10/2/25 13:43, hariconscious@xxxxxxxxx wrote:
> From: HariKrishna Sagala <hariconscious@xxxxxxxxx>
>
> This change ensures the structure pointer is explicitly initialized to
> NULL,preventing potential access to uninitialized memory. It improves
> code safety and avoids undefined behavior during pointer dereferencing.
>
> Signed-off-by: HariKrishna Sagala <hariconscious@xxxxxxxxx>
Hi Harikrishna,
Thank you for detailing your attempt at testing. Unfortunately, your
patch makes no substantive change. The variable you are setting to NULL
is assigned before use, so there is no risk of undefined behavior.
I know this can seem discouraging to hear, but I do want you to
encourage you to keep looking for ways you can make contributions.
Thanks,
David