projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix regressions
[apps/madmutt.git]
/
imap
/
imap.c
diff --git
a/imap/imap.c
b/imap/imap.c
index
8c7cc5e
..
3f988e8
100644
(file)
--- a/
imap/imap.c
+++ b/
imap/imap.c
@@
-692,8
+692,8
@@
int imap_open_mailbox (CONTEXT * ctx)
}
ctx->hdrmax = count;
}
ctx->hdrmax = count;
- ctx->hdrs =
mem_calloc (count, sizeof (HEADER *)
);
- ctx->v2r =
mem_calloc (count, sizeof (int)
);
+ ctx->hdrs =
p_new(HEADER *, count
);
+ ctx->v2r =
p_new(int, count
);
ctx->msgcount = 0;
if (count && (imap_read_headers (idata, 0, count - 1) < 0)) {
mutt_error _("Error opening mailbox");
ctx->msgcount = 0;
if (count && (imap_read_headers (idata, 0, count - 1) < 0)) {
mutt_error _("Error opening mailbox");
@@
-816,8
+816,7
@@
int imap_make_msg_set (IMAP_DATA * idata, BUFFER * buf, int flag, int changed)
int started = 0;
/* make copy of header pointers to sort in natural order */
int started = 0;
/* make copy of header pointers to sort in natural order */
- hdrs = mem_calloc (idata->ctx->msgcount, sizeof (HEADER *));
- memcpy (hdrs, idata->ctx->hdrs, idata->ctx->msgcount * sizeof (HEADER *));
+ hdrs = p_dup(idata->ctx->hdrs, idata->ctx->msgcount);
if (Sort != SORT_ORDER) {
oldsort = Sort;
if (Sort != SORT_ORDER) {
oldsort = Sort;