}
handle = _bt_add_id(mailid, BT_MAP_ID_EMAIL);
- if (mailbox->mailbox_type == EMAIL_MAILBOX_TYPE_INBOX) {
- _bt_mns_client_event_notify("NewMessage", handle,
- "TELECOM/MSG/INBOX", "",
- "EMAIL");
- }
- if (mailbox)
+ if (mailbox) {
+ if (mailbox->mailbox_type == EMAIL_MAILBOX_TYPE_INBOX) {
+ _bt_mns_client_event_notify("NewMessage", handle,
+ "TELECOM/MSG/INBOX", "",
+ "EMAIL");
+ }
email_free_mailbox(&mailbox, 1);
+ }
} else if (subtype == NOTI_MAIL_MOVE_FINISH) {
/* Received values from Signal*/
mail_ids = g_list_next(mail_ids);
}
}
- if (mailbox_to)
- email_free_mailbox(&mailbox_to, 1);
- if (mailbox_from)
- email_free_mailbox(&mailbox_from, 1);
+
+ email_free_mailbox(&mailbox_to, 1);
+ email_free_mailbox(&mailbox_from, 1);
}
}
email_info->recipient_name = g_strdup(mail_data->alias_recipient);
}
- email_info->recipient_addressing = g_strdup(mail_data->email_address_recipient);
+ if (mail_data->email_address_recipient) {
+ g_free(email_info->recipient_addressing);
+ email_info->recipient_addressing = g_strdup(mail_data->email_address_recipient);
+ }
return email_info;
}