Skip to content

Commit

Permalink
Fixed crash #274
Browse files Browse the repository at this point in the history
  • Loading branch information
dinhvh committed May 7, 2017
1 parent d4244c3 commit 1fe8fbc
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/low-level/imf/mailimf.c
Expand Up @@ -3083,6 +3083,7 @@ static int mailimf_group_parse(const char * message, size_t length,
struct mailimf_group * group;
int r;
int res;
clist * list;

cur_token = * indx;

Expand Down Expand Up @@ -3110,6 +3111,17 @@ static int mailimf_group_parse(const char * message, size_t length,
res = r;
goto free_display_name;
}
list = clist_new();
if (list == NULL) {
res = MAILIMF_ERROR_MEMORY;
goto free_display_name;
}
mailbox_list = mailimf_mailbox_list_new(list);
if (mailbox_list == NULL) {
res = MAILIMF_ERROR_MEMORY;
clist_free(list);
goto free_display_name;
}
break;
default:
res = r;
Expand Down

0 comments on commit 1fe8fbc

Please sign in to comment.