[lvc-project] [PATCH] scsi: elx: efct: fix memory leak in efct_hw_parse_filter()
Daniel Wagner
dwagner at suse.de
Fri Jun 13 10:37:22 MSK 2025
On Thu, Jun 12, 2025 at 09:35:18PM +0500, Vitaliy Shevtsov wrote:
> strsep() modifies the address of the pointer passed to it so that it no
> longer points to the original address. This means kfree() gets the wrong
> pointer.
>
> Fix this by passing unmodified pointer returned from kstrdup() to kfree().
>
> Found by Linux Verification Center (linuxtesting.org) with Svace.
>
> Fixes: 4df84e846624 ("scsi: elx: efct: Driver initialization routines")
> Signed-off-by: Vitaliy Shevtsov <v.shevtsov at mt-integration.ru>
Reviewed-by: Daniel Wagner <dwagner at suse.de>
More information about the lvc-project
mailing list