https://github.com/torvalds/linux
Revision d07e9fadf3a6b466ca3ae90fa4859089ff20530f authored by Alamy Liu on 25 February 2019, 19:22:14 UTC, committed by Ulf Hansson on 27 February 2019, 14:06:45 UTC
Free up the allocated memory in the case of error return

The value of mmc_host->cqe_enabled stays 'false'. Thus, cqhci_disable
(mmc_cqe_ops->cqe_disable) won't be called to free the memory.  Also,
cqhci_disable() seems to be designed to disable and free all resources, not
suitable to handle this corner case.

Fixes: a4080225f51d ("mmc: cqhci: support for command queue enabled host")
Signed-off-by: Alamy Liu <alamy.liu@gmail.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent 27ec9dc
History
Tip revision: d07e9fadf3a6b466ca3ae90fa4859089ff20530f authored by Alamy Liu on 25 February 2019, 19:22:14 UTC
mmc: cqhci: Fix a tiny potential memory leak on error condition
Tip revision: d07e9fa
File Mode Size
.gitignore -rw-r--r-- 151 bytes
Kconfig -rw-r--r-- 7.8 KB
Makefile -rw-r--r-- 2.0 KB
gen_init_cpio.c -rw-r--r-- 12.8 KB
gen_initramfs_list.sh -rwxr-xr-x 8.0 KB
initramfs_data.S -rw-r--r-- 1.3 KB

back to top