]> git.baikalelectronics.ru Git - kernel.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)
committerUlf Hansson <ulf.hansson@linaro.org>
Thu, 28 May 2020 09:21:03 +0000 (11:21 +0200)
commit87344ac0975e6815af4fb93ad1c74750c0cc8444
treecd11b10a7607a3683294c22d91ece320d1861e1c
parent4f68edb78c9e7c080ad62913f3cd250ba7657b17
mmc: sdio: Fix several potential memory leaks in mmc_sdio_init_card()

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
drivers/mmc/core/sdio.c