[PATCH v2 02/10] common: bootargs: don't leave linux_bootargs dangling after free
Marco Felsch
m.felsch at pengutronix.de
Thu Oct 15 02:49:34 PDT 2026
On 26-10-15 11:18, Ahmad Fatoum wrote:
> linux_bootargs_get() frees the cached command line before recomputing it,
> but the early return taken when there are no bootargs leaves the static
> pointer referencing the freed allocation, so the next call frees it a
> second time.
>
> Clear the pointer right after freeing it.
>
> Fixes: ee4cab9e5874 ("booting: more flexible Linux bootargs generation")
> Assisted-by: Claude:opus-5
> Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
Reviewed-by: Marco Felsch <m.felsch at pengutronix.de>
More information about the barebox
mailing list