int *returned_fds = NULL;
int fd;
bool ret = false;
+ char *key_appid;
g_variant_get(parameters, "(&s&sbb&s&sbu&s)", &local_appid, &local_port, &local_trusted, &bi_dir,
&remote_appid, &remote_port, &remote_trusted, &len, &raw);
if (g_hash_table_lookup(__trusted_app_list_hash, (gpointer)local_appid) == NULL) {
if (!is_preloaded(local_appid, remote_appid)) {
int ret = check_certificate(local_appid, remote_appid);
- if (ret == MESSAGE_PORT_ERROR_NONE)
- g_hash_table_insert(__trusted_app_list_hash, local_appid, "TRUE");
- else {
+ if (ret == MESSAGE_PORT_ERROR_NONE) {
+ key_appid = strdup(local_appid);
+ if (key_appid)
+ g_hash_table_insert(__trusted_app_list_hash, key_appid, "TRUE");
+ } else {
_LOGE("The application (%s) is not signed with the same certificate",
local_appid);
goto out;