for (i = 0; i < q_length; i++) {
elm = (email_event_t *)g_queue_peek_nth(g_event_que, i);
+ if (!elm){
+ EM_DEBUG_EXCEPTION("EMAIL_ERROR_DATA_NOT_FOUND");
+ err = EMAIL_ERROR_DATA_NOT_FOUND;
+ goto FINISH_OFF;
+ }
if(elm->type != EMAIL_EVENT_DOWNLOAD_ATTACHMENT) {
- if (elm && (elm->type != EMAIL_EVENT_NONE && elm->status != EMAIL_EVENT_STATUS_CANCELED)) {
+ if (elm->type != EMAIL_EVENT_NONE && elm->status != EMAIL_EVENT_STATUS_CANCELED) {
task_information[index].handle = elm->handle;
task_information[index].account_id = elm->account_id;
task_information[index].type = elm->type;
}
}else if(elm->type == EMAIL_EVENT_DOWNLOAD_ATTACHMENT) {
- if (elm && (elm->type != EMAIL_EVENT_NONE && elm->status != EMAIL_EVENT_STATUS_CANCELED)) {
+ if (elm->type != EMAIL_EVENT_NONE && elm->status != EMAIL_EVENT_STATUS_CANCELED) {
task_information[index].task_data1 = (void *)elm->event_param_data_4; /* mail_id */
task_information[index].task_data2 = (void *)elm->event_param_data_5; /* attachment_nth */
if (token_list == NULL) {
EM_DEBUG_LOG("g_strsplit_set failed.");
- if (mailbox)
- g_free(mailbox);
+ if (mailbox)
+ g_free(mailbox);
return NULL;
}
index++;
name = g_strdup(token_list[index - 1]);
- if (!name) /* prevent 27459 */ {
- if (mailbox)
- g_free(mailbox);
-
+ if (!name) {
return NULL;
- }
+ }
g_strfreev(token_list);