summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorintae, jeon <intae.jeon@samsung.com>2016-05-11 14:14:01 +0900
committerintae, jeon <intae.jeon@samsung.com>2016-05-11 19:25:36 +0900
commitae589a1006466158bc1a8a0e690b4ac1001b3186 (patch)
tree95893ad549398fd9ad29791120051be1df383c67
parentdef8c0f20edce7b6698746efdfb74a22a611cb11 (diff)
downloademail-service-accepted/tizen/ivi/20160524.094818.tar.gz
email-service-accepted/tizen/ivi/20160524.094818.tar.bz2
email-service-accepted/tizen/ivi/20160524.094818.zip
Change-Id: I3e94f159600de1e67332c1deed0bd338aae8e921 Signed-off-by: intae, jeon <intae.jeon@samsung.com>
-rwxr-xr-xemail-core/email-core-event.c9
-rwxr-xr-xemail-core/email-core-utils.c11
2 files changed, 11 insertions, 9 deletions
diff --git a/email-core/email-core-event.c b/email-core/email-core-event.c
index 0b30645..327f17d 100755
--- a/email-core/email-core-event.c
+++ b/email-core/email-core-event.c
@@ -1416,8 +1416,13 @@ INTERNAL_FUNC int emcore_get_task_information(email_task_information_t **output_
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;
@@ -1429,7 +1434,7 @@ INTERNAL_FUNC int emcore_get_task_information(email_task_information_t **output_
}
}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 */
diff --git a/email-core/email-core-utils.c b/email-core/email-core-utils.c
index 7c0af9c..21aa1f7 100755
--- a/email-core/email-core-utils.c
+++ b/email-core/email-core-utils.c
@@ -2151,8 +2151,8 @@ char *emcore_get_alias_of_mailbox(const char *mailbox_path)
if (token_list == NULL) {
EM_DEBUG_LOG("g_strsplit_set failed.");
- if (mailbox)
- g_free(mailbox);
+ if (mailbox)
+ g_free(mailbox);
return NULL;
}
@@ -2164,12 +2164,9 @@ char *emcore_get_alias_of_mailbox(const char *mailbox_path)
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);