<[EMAIL PROTECTED]> wrote: > I read some code of mailbox, there is a function name > mu_mailbox_create_default as follows, i add a comment and a few > codes, then resolve a memory leak
There are two possible memory leaks in this function. They are fixed in the repository. Thanks for reporting. > /* I add comment and a few codes */ > /* if ((mail != NULL) && (tmp_mbox == NULL)), then char *p not free, then > add this */ > if (p) > free (p); This change thrashes the memory area and coredumps right away (in the best case), or induces a coredump in some remote point (in the worst case). Both `p' and `tmp_mbox' can point to the same memory location, which will be freed twice. Regards, Sergey _______________________________________________ Bug-mailutils mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/bug-mailutils
