mmc: block: fix logical error to avoid memory leak
authorLiu, Changcheng <changcheng.liu@intel.com>
Sat, 16 Dec 2017 15:15:45 +0000 (23:15 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 24 Mar 2018 10:01:24 +0000 (11:01 +0100)
commit79a49fcc076882ea99ca52edb0a1569f1780a37c
tree6c1de7b3f29cd20ef19120628c108cc86606160c
parent9dd93e524955488300b8604ea3916881cee80977
mmc: block: fix logical error to avoid memory leak

[ Upstream commit 0be55579a127916ebe39db2a74d906a2dfceed42 ]

If the MMC_DRV_OP_GET_EXT_CSD request completes successfully, then
ext_csd must be freed, but in one case it was not. Fix that.

Signed-off-by: Liu Changcheng <changcheng.liu@intel.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mmc/core/block.c