X-Git-Url: http://git.madism.org/?a=blobdiff_plain;ds=sidebyside;f=imap%2Fbrowse.c;h=73bfcbc31fdb04dd8076f99c593105288e3d3737;hb=8e037c67a88cb4680c4391134c578e3b55a80f8a;hp=fd9c4730e467e205cfaa4f4ebeae1604fe316d81;hpb=bbc4fd52516a8afefbd14c77e34f8389d6f0a6ed;p=apps%2Fmadmutt.git diff --git a/imap/browse.c b/imap/browse.c index fd9c473..73bfcbc 100644 --- a/imap/browse.c +++ b/imap/browse.c @@ -17,6 +17,8 @@ #include #include +#include + #include "lib/mem.h" #include "lib/str.h" #include "lib/intl.h" @@ -231,13 +233,13 @@ int imap_browse (char *path, struct browser_state *state) if (save_lsub) set_option (OPTIMAPCHECKSUBSCRIBED); - mem_free (&mx.mbox); + p_delete(&mx.mbox); return 0; fail: if (save_lsub) set_option (OPTIMAPCHECKSUBSCRIBED); - mem_free (&mx.mbox); + p_delete(&mx.mbox); return -1; } @@ -284,11 +286,11 @@ int imap_mailbox_create (const char *folder) mutt_sleep (0); - mem_free (&mx.mbox); + p_delete(&mx.mbox); return 0; fail: - mem_free (&mx.mbox); + p_delete(&mx.mbox); return -1; } @@ -329,11 +331,11 @@ int imap_mailbox_rename (const char *mailbox) mutt_message (_("Mailbox renamed.")); mutt_sleep (0); - mem_free (&mx.mbox); + p_delete(&mx.mbox); return 0; fail: - mem_free (&mx.mbox); + p_delete(&mx.mbox); return -1; } @@ -356,7 +358,7 @@ static int browse_add_list_result (IMAP_DATA * idata, const char *cmd, do { if (imap_parse_list_response (idata, &name, &noselect, &noinferiors, &idata->delim) != 0) { - mem_free (&mx.mbox); + p_delete(&mx.mbox); return -1; } @@ -372,7 +374,7 @@ static int browse_add_list_result (IMAP_DATA * idata, const char *cmd, } while ((ascii_strncmp (idata->cmd.buf, idata->cmd.seq, SEQLEN) != 0)); - mem_free (&mx.mbox); + p_delete(&mx.mbox); return 0; } @@ -412,7 +414,7 @@ static void imap_add_folder (char delim, char *folder, int noselect, * than at scan, since it's so expensive to scan. But that's big changes * to browser.c */ if (!((regexec (Mask.rx, relpath, 0, NULL, 0) == 0) ^ Mask.not)) { - mem_free (&mx.mbox); + p_delete(&mx.mbox); return; } @@ -436,7 +438,7 @@ static void imap_add_folder (char delim, char *folder, int noselect, (state->entry)[state->entrylen].inferiors = !noinferiors; (state->entrylen)++; - mem_free (&mx.mbox); + p_delete(&mx.mbox); } static int compare_names (struct folder_file *a, struct folder_file *b)