]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mmc: sdio: Fix several potential memory leaks in mmc_sdio_init_card()
authorUlf Hansson <ulf.hansson@linaro.org>
Thu, 30 Apr 2020 09:16:38 +0000 (11:16 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Jun 2020 14:42:08 +0000 (16:42 +0200)
commit84d71e449d554ccb2b80ef1a08a6cfd30d1e2988
tree0a299ae859172a9775733b674b006323959c82f2
parente0f61e3ab2d8d99f92dac85615b0e962121d6d24
mmc: sdio: Fix several potential memory leaks in mmc_sdio_init_card()

commit a94a59f43749b4f8cd81b8be87c95f9ef898d19d upstream.

Over the years, the code in mmc_sdio_init_card() has grown to become quite
messy. Unfortunate this has also lead to that several paths are leaking
memory in form of an allocated struct mmc_card, which includes additional
data, such as initialized struct device for example.

Unfortunate, it's a too complex task find each offending commit. Therefore,
this change fixes all memory leaks at once.

Cc: <stable@vger.kernel.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://lore.kernel.org/r/20200430091640.455-3-ulf.hansson@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mmc/core/sdio.c