if (ret != CONTACTS_ERROR_NONE) {
debug_warning("contacts_list_get_current_record_p() failed (%d)", ret);
contacts_list_destroy(person_email_list, true);
+ free(contact_info);
return NULL;
}
- contact_info->email_id = email_id;
+
+ if (contact_info) {
+ contact_info->email_id = email_id;
+ }
contacts_list_destroy(person_email_list, true);
debug_leave();
return contact_info;
EMAIL_API char *email_file_dir_get(const char *path)
{
- return dirname(strdup(path));
+ char *tmp_path = strdup(path);
+ char *res = strdup(dirname(tmp_path));
+ free(tmp_path);
+ return res;
}
EMAIL_API Eina_Bool email_file_exists(const char *file)
g_vd = view;
- if (account_data->incoming_server_type == EMAIL_SERVER_TYPE_IMAP4)
+ if (account_data && account_data->incoming_server_type == EMAIL_SERVER_TYPE_IMAP4)
view->is_imap_push_supported = _is_imap_push_supported(account_data);
_create_list(view);
_create_toolbar_more_btn(view);
- if (account_data->incoming_server_type == EMAIL_SERVER_TYPE_IMAP4)
+ if (account_data && account_data->incoming_server_type == EMAIL_SERVER_TYPE_IMAP4)
view->is_imap_push_supported = _is_imap_push_supported(account_data);
_create_list(view);
evas_object_data_set(fwd_popup_genlist, VIEWER_EVAS_DATA_NAME, view);
view->fwd_popup_data = MEM_ALLOC(view->fwd_popup_data, 1);
+ if (!view->fwd_popup_data) {
+ debug_error("Failed to allocate memory for fwd_popup_data!");
+ DELETE_EVAS_OBJECT(view->fwd_option_popup);
+ return;
+ }
+
view->fwd_popup_data->radio_group = elm_radio_add(fwd_popup_genlist);
elm_radio_value_set(view->fwd_popup_data->radio_group, FWD_NEW_RECIPIENT_INDEX);