diff options
| author | Bhalchandra Gajare <gajare@codeaurora.org> | 2015-12-04 17:18:52 -0800 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 21:13:27 -0700 |
| commit | 7efd0a96446240ac8a7eecbcffb8f2f1a0b64597 (patch) | |
| tree | 909a990cd6bdeaa54bb17ad81c0d3fa749781683 | |
| parent | 3035a7709cdc0b55decb9d0fa43cbc7e9c0d9065 (diff) | |
ASoC: wcd_cpe_core: Fix memory leak
During sound model de-registration, the message to be sent to CPE is
dynamically allocated but not freed. This causes memory leak in the
driver. Fix by adding kfree() to free the memory once the message
transfer is completed.
CRs-fixed: 933901
Change-Id: I02f25fc3457d530de436eb33da1709517b597e7b
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
| -rw-r--r-- | sound/soc/codecs/wcd_cpe_core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/codecs/wcd_cpe_core.c b/sound/soc/codecs/wcd_cpe_core.c index d12554fcf8db..0f64599e8dd1 100644 --- a/sound/soc/codecs/wcd_cpe_core.c +++ b/sound/soc/codecs/wcd_cpe_core.c @@ -2959,6 +2959,7 @@ static int wcd_cpe_send_param_dereg_model( __func__, rc); WCD_CPE_REL_LOCK(&session->lsm_lock, "lsm"); err_ret: + kfree(message); return rc; } |
