diff options
author | Rios Kao <rioskao@google.com> | 2020-10-19 08:34:59 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-10-19 08:34:59 +0000 |
commit | 7db6baa1a75ddef0e98891390bc6927e4da110e0 (patch) | |
tree | 83cfb0836788dab6e9a2a0c9fc649c031ce9d9d5 /sound_trigger_hw_iaxxx.c | |
parent | c30d34012aa045594e53577c7d1b89cfed0f4ca4 (diff) | |
parent | 4d8ab90a88aa630612a4d0eda8734f5ac3bf4197 (diff) | |
download | sound_trigger_hal-7db6baa1a75ddef0e98891390bc6927e4da110e0.tar.gz |
Merge "sthal: prevent double free the inactive model" into rvc-qpr-devandroid-11.0.0_r46android-11.0.0_r43android-11.0.0_r40android-11.0.0_r39android-11.0.0_r38android11-qpr3-s1-releaseandroid11-qpr3-release
Diffstat (limited to 'sound_trigger_hw_iaxxx.c')
-rw-r--r-- | sound_trigger_hw_iaxxx.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound_trigger_hw_iaxxx.c b/sound_trigger_hw_iaxxx.c index fbbfa79..e3d34ff 100644 --- a/sound_trigger_hw_iaxxx.c +++ b/sound_trigger_hw_iaxxx.c @@ -2632,6 +2632,10 @@ static int stop_recognition(struct knowles_sound_trigger_device *stdev, model->is_active = false; goto exit; } + if (model->is_active == false) { + ALOGW("%s: the model was disabled already", __func__); + goto exit; + } if (stdev->adnc_strm_handle[handle] != 0) { ALOGD("%s: stop tunnling for index:%d", __func__, handle); |