Commit 8e31c6cc authored by Vitaliy Shevtsov's avatar Vitaliy Shevtsov Committed by Greg Kroah-Hartman
Browse files

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



[ Upstream commit 2a8a5a5d ]

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>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 92750bfe
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment