contacts_list_first(list);
while (CONTACTS_ERROR_NONE == contacts_list_get_current_record_p(list, &record)) {
- contacts_record_get_bool(record, _contacts_person_number.is_favorite, &b_favorite);
+ err = contacts_record_get_bool(record, _contacts_person_number.is_favorite, &b_favorite);
+ if (CONTACTS_ERROR_NONE != err)
+ err("contacts_record_get_bool is error");
+
*is_favorite = b_favorite;
info("is_favorite %d", *is_favorite);
+
err = contacts_list_next(list);
if (CONTACTS_ERROR_NONE != err)
break;
_callmgr_util_get_pkg_name(CM_UTIL_PKG_ID_PHONE, &phone_pkg_name);
if (!phone_pkg_name) {
err("phone_pkg_name is NULL");
+ notification_free(noti);
return;
}
error = contacts_connect();
if (error != CONTACTS_ERROR_NONE) {
err("contacts_connect() failed [%d](%s)", error, get_error_message(error));
+ notification_free(noti);
return;
}
err("Fail to notification_set_text : %d", noti_err);
}
- if ((CONTACTS_ERROR_NONE != error)
- || (log_cnt == 2))
+ if ((CONTACTS_ERROR_NONE != error) || (log_cnt == 2)) {
+ if (disp_str) {
+ g_free(disp_str);
+ disp_str = NULL;
+ }
break;
+ }
}
}
_callmgr_util_get_pkg_name(CM_UTIL_PKG_ID_PHONE, &phone_pkg_name);
if (!phone_pkg_name) {
err("phone_pkg_name is NULL");
+ noti_err = notification_free(noti);
return;
}