kernel_optimize_test/drivers/memstick/host
Dan Carpenter 41fe79cf11 memstick: jmb38x_ms: use appropriate free function in jmb38x_ms_alloc_host()
[ Upstream commit beae4a6258e64af609ad5995cc6b6056eb0d898e ]

The "msh" pointer is device managed, meaning that memstick_alloc_host()
calls device_initialize() on it.  That means that it can't be free
using kfree() but must instead be freed with memstick_free_host().
Otherwise it leads to a tiny memory leak of device resources.

Fixes: 60fdd931d5 ("memstick: add support for JMicron jmb38x MemoryStick host controller")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20211011123912.GD15188@kili
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-11-18 14:04:07 +01:00
..
jmb38x_ms.c memstick: jmb38x_ms: use appropriate free function in jmb38x_ms_alloc_host() 2021-11-18 14:04:07 +01:00
Kconfig memstick: Fix Kconfig indentation 2019-11-21 12:25:59 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
r592.c memstick: r592: Fix a UAF bug when removing the driver 2021-11-18 14:03:58 +01:00
r592.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
rtsx_pci_ms.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 17 2019-05-21 11:28:46 +02:00
rtsx_usb_ms.c memstick: rtsx_usb_ms: fix UAF 2021-07-14 16:55:53 +02:00
tifm_ms.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00