projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
pick implement rfc2047
[mmh]
/
sbr
/
folder_realloc.c
diff --git
a/sbr/folder_realloc.c
b/sbr/folder_realloc.c
index
47b9281
..
64a6640
100644
(file)
--- a/
sbr/folder_realloc.c
+++ b/
sbr/folder_realloc.c
@@
-54,7
+54,7
@@
folder_realloc(struct msgs *mp, int lo, int hi)
seqset_t *tmpstats;
/* first allocate the new message status space */
seqset_t *tmpstats;
/* first allocate the new message status space */
- tmpstats = mh_xmalloc(MSGSTATSIZE(mp, lo, hi));
+ tmpstats = mh_xcalloc(MSGSTATSIZE(mp, lo, hi), 1);
/* then copy messages status array with shift */
if (mp->nummsg > 0) {
/* then copy messages status array with shift */
if (mp->nummsg > 0) {
@@
-62,7
+62,7
@@
folder_realloc(struct msgs *mp, int lo, int hi)
tmpstats[msgnum - lo] = mp->msgstats[msgnum - mp->lowoff];
}
}
tmpstats[msgnum - lo] = mp->msgstats[msgnum - mp->lowoff];
}
}
- free(mp->msgstats);
+ mh_free0(&(mp->msgstats));
mp->msgstats = tmpstats;
}
mp->msgstats = tmpstats;
}