Hi,

On Tue, Jun 16, 2026 at 9:42 AM Naveen Kumar Chaudhary
<[email protected]> wrote:
>
> When kdb_setenv() fails to find a free slot in __env[], the function
> returns KDB_ENVFULL without freeing the previously allocated string
> buffer 'ep', leaking memory on every failed call.
>
> Add the missing kfree(ep) before returning KDB_ENVFULL.
>
> Signed-off-by: Naveen Kumar Chaudhary <[email protected]>
> ---
>  kernel/debug/kdb/kdb_main.c | 1 +
>  1 file changed, 1 insertion(+)

With the exception of the missing 'k' at the start of the subject
line, this looks good to me. Presumably it should have a "Fixes:" line
too:

Fixes: a30d4ff8193e ("kdb: remove usage of static environment buffer")

Aside from that:

Reviewed-by: Douglas Anderson <[email protected]>


_______________________________________________
Kgdb-bugreport mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport

Reply via email to