X-Git-Url: http://git.madism.org/?a=blobdiff_plain;ds=sidebyside;f=pop%2Fpop.c;h=b8e9e064f4d500bf780bdd693ca5fa9d78858999;hb=8e037c67a88cb4680c4391134c578e3b55a80f8a;hp=34d1cc779e126ca2eec31738df223b81952256f3;hpb=c8ceef3ed6424dcb5a6ec835e7d8d9cc00595372;p=apps%2Fmadmutt.git diff --git a/pop/pop.c b/pop/pop.c index 34d1cc7..b8e9e06 100644 --- a/pop/pop.c +++ b/pop/pop.c @@ -11,6 +11,8 @@ # include "config.h" #endif +#include + #include "mutt.h" #include "mx.h" #include "pop.h" @@ -246,7 +248,7 @@ int pop_open_mailbox (CONTEXT * ctx) if (!conn) return -1; - mem_free (&ctx->path); + p_delete(&ctx->path); ctx->path = str_dup (buf); pop_data = mem_calloc (1, sizeof (POP_DATA)); @@ -291,7 +293,7 @@ static void pop_clear_cache (POP_DATA * pop_data) for (i = 0; i < POP_CACHE_LEN; i++) { if (pop_data->cache[i].path) { unlink (pop_data->cache[i].path); - mem_free (&pop_data->cache[i].path); + p_delete(&pop_data->cache[i].path); } } } @@ -349,7 +351,7 @@ int pop_fetch_message (MESSAGE * msg, CONTEXT * ctx, int msgno) else { /* clear the previous entry */ unlink (cache->path); - mem_free (&cache->path); + p_delete(&cache->path); } } @@ -532,7 +534,7 @@ void pop_fetch_mail (void) strcpy (p, PopHost); /* __STRCPY_CHECKED__ */ ret = pop_parse_path (url, &acct); - mem_free (&url); + p_delete(&url); if (ret) { mutt_error (_("%s is an invalid POP path"), PopHost); return; @@ -547,7 +549,7 @@ void pop_fetch_mail (void) if (pop_open_connection (pop_data) < 0) { mutt_socket_free (pop_data->conn); - mem_free (&pop_data); + p_delete(&pop_data); return; } @@ -649,11 +651,11 @@ finish: if (pop_query (pop_data, buffer, sizeof (buffer)) == PQ_NOT_CONNECTED) goto fail; mutt_socket_close (conn); - mem_free (&pop_data); + p_delete(&pop_data); return; fail: mutt_error _("Server closed connection!"); mutt_socket_close (conn); - mem_free (&pop_data); + p_delete(&pop_data); }