mmc: core: free mmc_card if cmd 3,9,7 fails in mmc_sd_init_card
authorWei WANG <wei_wang@realsil.com.cn>
Wed, 17 Jul 2013 06:21:10 +0000 (14:21 +0800)
committerlintao <lintao@rock-chips.com>
Fri, 7 Mar 2014 05:42:25 +0000 (13:42 +0800)
commitcd94e9b0aa4ed53b68a37034ee2b32137e07658d
treea6aca3d7c563cd4f66a6b2d6aba72cb413dca0c6
parent57670402bd199e28eff4edb50469182c4e2a3b9f
mmc: core: free mmc_card if cmd 3,9,7 fails in mmc_sd_init_card

In function mmc_sd_init_card, if command 3/9/7 got failed, mmc_card
allocated just before won't be freed. This would cause memory leak.

Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/core/sd.c