diff options
| author | Vidyakumar Athota <vathota@codeaurora.org> | 2015-12-16 15:42:39 -0800 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 21:15:41 -0700 |
| commit | df607d1693a267c3956d817ac8ec25c42cac79bb (patch) | |
| tree | 826e8fb826aef7d4e803bd0820a318204371a708 /include | |
| parent | c912f24c79fb67b340ec85df702c639d84f7efc1 (diff) | |
ASoC: msm-lsm-client: free lsm client data in msm_lsm_close
Currently lsm client data is deallocated when q6lsm_open() fails
which can cause memory corruption if lsm client data is accessed
after freed. Fix this issue by deallocating the client data only
in msm_lsm_close().
Change-Id: If048c26a0ffd8a346a28622183cbf2ba1e7e5ff3
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/sound/q6lsm.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sound/q6lsm.h b/include/sound/q6lsm.h index 7cb7e15941cb..fb848bc70873 100644 --- a/include/sound/q6lsm.h +++ b/include/sound/q6lsm.h @@ -71,6 +71,7 @@ struct lsm_client { uint16_t connect_to_port; uint8_t num_confidence_levels; uint8_t *confidence_levels; + bool opened; bool started; dma_addr_t lsm_cal_phy_addr; uint32_t lsm_cal_size; |
