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
Raw File
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
COPYING
The Linux Kernel is provided under:

	SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note

Being under the terms of the GNU General Public License version 2 only,
according with:

	LICENSES/preferred/GPL-2.0

With an explicit syscall exception, as stated at:

	LICENSES/exceptions/Linux-syscall-note

In addition, other licenses may also apply. Please see:

	Documentation/process/license-rules.rst

for more details.
back to top