Skip to content
Commit 2a8a5a5d authored by Vitaliy Shevtsov's avatar Vitaliy Shevtsov Committed by Martin K. Petersen
Browse files

scsi: elx: efct: Fix memory leak in efct_hw_parse_filter()



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: 4df84e84 ("scsi: elx: efct: Driver initialization routines")
Signed-off-by: default avatarVitaliy Shevtsov <v.shevtsov@mt-integration.ru>
Link: https://lore.kernel.org/r/20250612163616.24298-1-v.shevtsov@mt-integration.ru


Reviewed-by: default avatarDaniel Wagner <dwagner@suse.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent d8ab68bd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment