Merge "st-hal: fix mem leak issue"
diff --git a/sound_trigger_hw.c b/sound_trigger_hw.c
index 6f9b6f1..91ff15f 100644
--- a/sound_trigger_hw.c
+++ b/sound_trigger_hw.c
@@ -905,8 +905,6 @@
                 }
             }
 
-            platform_stdev_reset_backend_cfg(stdev->platform);
-
             list_for_each(p_ses_node, &stdev->sound_model_list) {
                 p_ses = node_to_item(p_ses_node, st_session_t, list_node);
                 if (p_ses && p_ses->exec_mode == ST_EXEC_MODE_ADSP) {
@@ -1149,8 +1147,6 @@
             }
         }
 
-        platform_stdev_reset_backend_cfg(stdev->platform);
-
         list_for_each(p_ses_node, &stdev->sound_model_list) {
             p_ses = node_to_item(p_ses_node, st_session_t, list_node);
             if (p_ses && p_ses->exec_mode == ST_EXEC_MODE_ADSP) {
@@ -1203,8 +1199,6 @@
             }
         }
 
-        platform_stdev_reset_backend_cfg(stdev->platform);
-
         list_for_each(p_ses_node, &stdev->sound_model_list) {
             p_ses = node_to_item(p_ses_node, st_session_t, list_node);
             if (p_ses && p_ses->exec_mode == ST_EXEC_MODE_ADSP) {
diff --git a/st_hw_session_lsm.c b/st_hw_session_lsm.c
index 1ff1abc..f1a915b 100644
--- a/st_hw_session_lsm.c
+++ b/st_hw_session_lsm.c
@@ -580,7 +580,7 @@
 {
     st_profile_type_t profile_type;
 
-    profile_type = (p_ses->vendor_uuid_info && !p_ses->stdev->lpi_enable) ?
+    profile_type = (p_ses->vendor_uuid_info && !p_ses->lpi_enable) ?
                    p_ses->vendor_uuid_info->profile_type : ST_PROFILE_TYPE_NONE;
     return profile_type;
 }
diff --git a/st_session.c b/st_session.c
index b72dcb6..9bb1c09 100644
--- a/st_session.c
+++ b/st_session.c
@@ -2512,6 +2512,7 @@
         hw_ses->lpi_enable = hw_ses->stdev->lpi_enable;
         hw_ses->barge_in_mode = hw_ses->stdev->barge_in_mode;
         do_unload = true;
+        platform_stdev_reset_backend_cfg(hw_ses->stdev->platform);
     }
 
     /*