Merge "st-hal: Fix potential NULL pointer dereference" into audio-hal.lnx.8.0
diff --git a/st_session.c b/st_session.c
index b72e277..a2d9b03 100644
--- a/st_session.c
+++ b/st_session.c
@@ -2659,6 +2659,11 @@
              * during only one remaining client model as there won't be a
              * merged model yet.
              */
+            if (!conf_levels) {
+                ALOGE("%s: ERROR. conf levels alloc failed", __func__);
+                status = -ENOMEM;
+                return status;
+            }
             memcpy(stc_ses->sm_info.cf_levels, conf_levels,
                    stc_ses->sm_info.cf_levels_size);