DO NOT MERGE Fix potential DoS caused by delivering signal to BT process

Bug: 28885210
Change-Id: I63866d894bfca47464d6e42e3fb0357c4f94d360

 Conflicts:
	btif/co/bta_hh_co.c
	btif/src/btif_core.c
Merge conflict resolution of ag/1161415 (referencing ag/1164670)
- Directly into mnc-mr2-release

config_t *config_new_empty(void) {
 config_t *config = osi_calloc(sizeof(config_t));
 if (!config) {
    LOG_ERROR("%s unable to allocate memory for config_t.", __func__);
 goto error;
 }

  config->sections = list_new(section_free);
 if (!config->sections) {
    LOG_ERROR("%s unable to allocate list for sections.", __func__);
 goto error;
 }

 return config;

error:;
  config_free(config);
 return NULL;
}

config_t *config_new_empty(void) {
 config_t *config = osi_calloc(sizeof(config_t));
 if (!config) {
    LOG_ERROR("%s unable to allocate memory for config_t.", __func__);
 goto error;
 }

  config->sections = list_new(section_free);
 if (!config->sections) {
    LOG_ERROR("%s unable to allocate list for sections.", __func__);
 goto error;
 }

 return config;

error:;
  config_free(config);
 return NULL;
}
