audio: fix memory corruption.
Race condition:
There is a race condition between audio primary hal thread and soundtrigger
hal thread when they want to get snd_card number.
Memory leakage:
my_data.kvpairs in platforom_info_init function doesn't be destroyed
when use str_parms_create().
Bug: 119328981
Test: manual audio test
Change-Id: Ib86b3cf986a7213007bf9f073ef714a02b28a111
Signed-off-by: juyuchen <juyuchen@google.com>
diff --git a/hal/msm8916/platform.c b/hal/msm8916/platform.c
index 2bf552c..2707c89 100644
--- a/hal/msm8916/platform.c
+++ b/hal/msm8916/platform.c
@@ -1132,7 +1132,8 @@
/* Initialize ACDB and PCM ID's */
strlcpy(platform_info_path, PLATFORM_INFO_XML_PATH, MAX_MIXER_XML_PATH);
resolve_config_file(platform_info_path);
- platform_info_init(platform_info_path, my_data);
+ platform_info_init(platform_info_path, my_data,
+ true, &platform_set_parameters);
my_data->acdb_handle = dlopen(LIB_ACDB_LOADER, RTLD_NOW);
if (my_data->acdb_handle == NULL) {