- int comm_path_noti_len = strlen(EVENT_COMMUNICATION_PATH_NOTI) + strlen(noti_key) + 1;
- int len = 0;
- noti_spec_bag->communication_path_noti = (char *)calloc(comm_path_noti_len, sizeof(char));
-
- if (noti_spec_bag->communication_path_noti != NULL) {
- len = g_strlcat(noti_spec_bag->communication_path_noti, EVENT_COMMUNICATION_PATH_NOTI, comm_path_noti_len);
- len = g_strlcat(noti_spec_bag->communication_path_noti, noti_key, comm_path_noti_len);
-
- if (len >= comm_path_noti_len) {
- _DEBUG_ERROR("noti_spec_bag->communication_path_noti buffer overflow !!");
- free(noti_spec_bag->communication_path_noti);
- free(noti_spec_bag);
- return SYNC_AGENT_EVENT_FAIL;
- }
-
- _DEBUG_INFO("EVENT_COMMUNICATION_PATH_NOTI : %s", noti_spec_bag->communication_path_noti);
- } else {
- _DEBUG_ERROR("noti_spec_bag->communication_path_not is NULL");
+ noti_spec_bag->communication_path_noti = _make_communication_path(EVENT_COMMUNICATION_PATH_NOTI, noti_key);
+ if (noti_spec_bag->communication_path_noti == NULL) {
+ _DEBUG_ERROR("noti_spec_bag->communication_path_noti is NULL");
+ while(noti_spec_bag->noti_count > 0)
+ free(noti_spec_bag->noti_spec_list[--noti_spec_bag->noti_count]);
+ free(noti_spec_bag->noti_key);