It will fail, rather than return NULL.
Further clean up imap_new_data() since it also had NULL checks for
safe_calloc() that shouldn't happen.
int count = 0;
struct Buffer *cmd = mutt_buffer_new();
- if (!cmd)
- {
- mutt_debug(1, "unable to allocate buffer\n");
- return -1;
- }
/* We make a copy of the headers just in case resorting doesn't give
exactly the original order (duplicate messages?), because other parts of
struct ImapData *idata = mutt_mem_calloc(1, sizeof(struct ImapData));
idata->cmdbuf = mutt_buffer_new();
- if (!idata->cmdbuf)
- FREE(&idata);
-
idata->cmdslots = ImapPipelineDepth + 2;
idata->cmds = mutt_mem_calloc(idata->cmdslots, sizeof(*idata->cmds));
mbstate_t mbstate1, mbstate2;
struct Buffer *b = mutt_buffer_new();
- if (!b)
- return -1;
memset(&mbstate1, 0, sizeof(mbstate1));
memset(&mbstate2, 0, sizeof(mbstate2));
for (; (k = mbrtowc(&wc, p, MB_LEN_MAX, &mbstate1)); p += k)