summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunggoo Kim <sung.goo.kim@samsung.com>2013-08-09 07:09:28 (GMT)
committerSunggoo Kim <sung.goo.kim@samsung.com>2013-08-09 07:09:28 (GMT)
commit5d8167d9575ff3f3f2ff19b30e5402c398ad4340 (patch)
tree23ad108d1f8ae25bfe90b1122fe31d620e97f6da
parentd67c5fa5b96099ee545a94ab0f74f575839b41d1 (diff)
downloadphone-contacts-5d8167d9575ff3f3f2ff19b30e5402c398ad4340.zip
phone-contacts-5d8167d9575ff3f3f2ff19b30e5402c398ad4340.tar.gz
phone-contacts-5d8167d9575ff3f3f2ff19b30e5402c398ad4340.tar.bz2
Fix prevent
-rwxr-xr-xlib/common/ct-group-input-view.c11
-rwxr-xr-xlib/common/ct-list-view-common.c2
-rwxr-xr-xlib/common/ph-common.c12
-rwxr-xr-xlib/common/ph-detail-log.c2
-rwxr-xr-xlib/favor/ph-favorite-view.c3
-rwxr-xr-xlib/ph-front/ph-front-view.c5
6 files changed, 24 insertions, 11 deletions
diff --git a/lib/common/ct-group-input-view.c b/lib/common/ct-group-input-view.c
index f908b0e..1c3c9ce 100755
--- a/lib/common/ct-group-input-view.c
+++ b/lib/common/ct-group-input-view.c
@@ -840,23 +840,24 @@ int group_input_get_member_list(int group_id, Eina_List **list)
person_info = calloc(1, sizeof(ct_person_list));
person_info->id = person_id;
+
ret = contacts_record_get_str_p(record, _contacts_person.display_name,&display_name);
- p_retvm_if(CONTACTS_ERROR_NONE != ret, ret, "contacts_record_get_str_p() Failed(%d)", ret);
+ p_warn_if(CONTACTS_ERROR_NONE != ret, "contacts_record_get_str_p() Failed(%d)", ret);
person_info->display = SAFE_STRDUP(display_name);
ret = contacts_record_get_int(record, _contacts_person.link_count,&(person_info->link_count));
- p_retvm_if(CONTACTS_ERROR_NONE != ret, ret, "contacts_record_get_int() Failed(%d)", ret);
+ p_warn_if(CONTACTS_ERROR_NONE != ret, "contacts_record_get_int() Failed(%d)", ret);
ret = contacts_record_get_str(record, _contacts_person.addressbook_ids,&addressbook_ids);
- p_retvm_if(CONTACTS_ERROR_NONE != ret, ret, "contacts_record_get_int() Failed(%d)", ret);
+ p_warn_if(CONTACTS_ERROR_NONE != ret, "contacts_record_get_int() Failed(%d)", ret);
person_info->addressbook_id_list = ctui_get_addressbook_id_list(addressbook_ids, " ");
*list = eina_list_append(*list, person_info);
ret = contacts_list_next(person_list);
- p_retvm_if(CONTACTS_ERROR_NONE != ret, ret, "contacts_list_next() Failed(%d)", ret);
+ p_warn_if(CONTACTS_ERROR_NONE != ret, "contacts_list_next() Failed(%d)", ret);
ret = contacts_list_get_current_record_p(person_list, &record);
- p_retvm_if(CONTACTS_ERROR_NONE != ret, ret, "contacts_list_get_current_record_p() Failed(%d)", ret);
+ p_warn_if(CONTACTS_ERROR_NONE != ret, "contacts_list_get_current_record_p() Failed(%d)", ret);
}
ret = contacts_list_destroy(person_list, true);
p_retvm_if(CONTACTS_ERROR_NONE != ret, ret, "contacts_list_destroy() Failed(%d)", ret);
diff --git a/lib/common/ct-list-view-common.c b/lib/common/ct-list-view-common.c
index fb6548d..66651e7 100755
--- a/lib/common/ct-list-view-common.c
+++ b/lib/common/ct-list-view-common.c
@@ -2129,8 +2129,6 @@ static Eina_Bool list_genlist_update(void *data)
while(next_item = elm_genlist_item_next_get(item_cur)) {
if(next_item)
elm_object_item_del(next_item);
- else
- break;
}
elm_object_item_del(item_cur);
}
diff --git a/lib/common/ph-common.c b/lib/common/ph-common.c
index 2035b5f..344e72d 100755
--- a/lib/common/ph-common.c
+++ b/lib/common/ph-common.c
@@ -1037,12 +1037,12 @@ void phone_ug_return_value(service_h service, int person_id, int num_id, int ema
contacts_record_h number_record = NULL;
contacts_record_h email_record = NULL;
- service_create(&reply);
-
if (person_id) {
char **result_array = NULL;
result_array = calloc(1, sizeof(char *));
+ service_create(&reply);
+
snprintf(buf, sizeof(buf), "%d", person_id);
PH_DBG("person id %s", buf);
@@ -1062,6 +1062,9 @@ void phone_ug_return_value(service_h service, int person_id, int num_id, int ema
if (num_id) {
const char *number = NULL;
char **result_array = NULL;
+
+ service_create(&reply);
+
result_array = calloc(1, sizeof(char *));
err = contacts_db_get_record(_contacts_number._uri, num_id, &number_record);
@@ -1091,6 +1094,9 @@ void phone_ug_return_value(service_h service, int person_id, int num_id, int ema
if (email_id) {
const char *email = NULL;
char **result_array = NULL;
+
+ service_create(&reply);
+
result_array = calloc(1, sizeof(char *));
err = contacts_db_get_record(_contacts_email._uri, email_id, &email_record);
@@ -1118,6 +1124,8 @@ void phone_ug_return_value(service_h service, int person_id, int num_id, int ema
}
if (result_id) {
+ service_create(&reply);
+
snprintf(buf, sizeof(buf), "%d", person_id);
PH_DBG("person id %s", buf);
diff --git a/lib/common/ph-detail-log.c b/lib/common/ph-detail-log.c
index 4266ab5..e14e322 100755
--- a/lib/common/ph-detail-log.c
+++ b/lib/common/ph-detail-log.c
@@ -288,7 +288,7 @@ static void _ph_set_default_timezone_id()
int timezone_str_size;
- strncpy(timezone_id, vconf_get_str(VCONFKEY_SETAPPL_TIMEZONE_ID), sizeof(timezone_id));
+ strncpy(timezone_id, vconf_get_str(VCONFKEY_SETAPPL_TIMEZONE_ID), sizeof(timezone_id)-1);
timezone_str_size = readlink("/opt/etc/localtime", timezone_buffer, sizeof(timezone_buffer));
diff --git a/lib/favor/ph-favorite-view.c b/lib/favor/ph-favorite-view.c
index b1f5bde..b46cd00 100755
--- a/lib/favor/ph-favorite-view.c
+++ b/lib/favor/ph-favorite-view.c
@@ -1391,17 +1391,20 @@ static Eina_List* favor_get_contact(Eina_List *favor_list)
err = phone_cts_get_str_from_list(person_list, _contacts_person.display_name, &person_info->display);
if (CONTACTS_ERROR_NONE != err) {
ERR("phone_cts_get_str_from_list() Failed(%d)", err);
+ free(person_info);
break;
}
SAFE_STRDUP(person_info->display);
err = phone_cts_get_int_from_list(person_list, _contacts_person.link_count, &person_info->link_count);
if (CONTACTS_ERROR_NONE != err) {
ERR("phone_cts_get_int_from_list() Failed(%d)", err);
+ free(person_info);
break;
}
err = phone_cts_get_str_from_list(person_list, _contacts_person.display_name_index, &(person_info->display_index));
if (CONTACTS_ERROR_NONE != err) {
ERR("phone_cts_get_str_from_list() Failed(%d)", err);
+ free(person_info);
break;
}
err = phone_cts_get_str_from_list(person_list, _contacts_person_contact.addressbook_ids, &addressbook_ids);
diff --git a/lib/ph-front/ph-front-view.c b/lib/ph-front/ph-front-view.c
index 7ae7bbd..31977e7 100755
--- a/lib/ph-front/ph-front-view.c
+++ b/lib/ph-front/ph-front-view.c
@@ -562,13 +562,16 @@ API int phone_front_view_show_call_app(ph_phoneui_data *phoneui_d)
service_set_operation(service, SERVICE_OPERATION_CALL);
service_set_uri(service, "tel:");
service_foreach_app_matched(service, front_view_call_app_check, (void *)&call_app_launched);
+ service_destroy(service);
- if (call_app_launched)
+ if (call_app_launched) {
return 1;
+ }
if (1 == aul_app_is_running(VIDEOCALL_PKG)) {
aul_open_app(VIDEOCALL_PKG);
return 1;
}
+
return 0;
}