]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mmc: omap: Fix memory leak in mmc_omap_new_slot
authorMiaoqian Lin <linmq006@gmail.com>
Tue, 18 Mar 2025 14:02:25 +0000 (22:02 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:37:42 +0000 (14:37 +0200)
commit261f51775ef5e97629dc0d7f812a234cad92b2e6
tree64e3ed24817dd7580cd8a244b6bc03b0b087068d
parent90bcdefe220a309f373a965fc502c5d0013abbc9
mmc: omap: Fix memory leak in mmc_omap_new_slot

commit 3834a759afb817e23a7a2f09c2c9911b0ce5c588 upstream.

Add err_free_host label to properly pair mmc_alloc_host() with
mmc_free_host() in GPIO error paths. The allocated host memory was
leaked when GPIO lookups failed.

Fixes: e519f0bb64ef ("ARM/mmc: Convert old mmci-omap to GPIO descriptors")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250318140226.19650-1-linmq006@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mmc/host/omap.c