hal: Fix memory leakage in audio HAL
Memory leakage is observed in HAL where data allocated is not
freed at the end of function.
Free allocated data at the end of function.
Change-Id: I9d46525234af742772a1cc0e70d3baeedda57698
CRs-Fixed: 2033673
diff --git a/hal/audio_extn/utils.c b/hal/audio_extn/utils.c
index 5d98ee1..4b8692b 100644
--- a/hal/audio_extn/utils.c
+++ b/hal/audio_extn/utils.c
@@ -468,6 +468,7 @@
streams_output_cfg_list,
streams_input_cfg_list);
ALOGE("%s: could not load io policy config!", __func__);
+ free(root);
return;
}
}
@@ -480,6 +481,7 @@
streams_input_cfg_list);
config_free(root);
+ free(root);
free(data);
}