summaryrefslogtreecommitdiff
path: root/email-core/email-core-account.c
diff options
context:
space:
mode:
Diffstat (limited to 'email-core/email-core-account.c')
-rwxr-xr-xemail-core/email-core-account.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/email-core/email-core-account.c b/email-core/email-core-account.c
index 6ed5d1f..96e3c52 100755
--- a/email-core/email-core-account.c
+++ b/email-core/email-core-account.c
@@ -632,8 +632,10 @@ INTERNAL_FUNC int emcore_init_account_reference()
/* memset(accounts + i, 0x00, sizeof(email_account_t)) */
*p = (email_account_list_t*) em_malloc(sizeof(email_account_list_t));
- if (!(*p)) {
+ if (!(*p)) { /*prevent 26223*/
EM_DEBUG_EXCEPTION("malloc failed...");
+ emcore_free_account(account);
+ EM_SAFE_FREE(account);
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
}