#include <config.h>
#endif
+#include <lib-lib/mem.h>
+
#include "mutt.h"
#include "mutt_curses.h"
#include "sort.h"
nntp_add_to_list (news, data);
}
else
- mem_free (&data->entries);
+ p_delete(&data->entries);
data->rc = 1;
data->entries = mem_calloc (x * 2, sizeof (NEWSRC_ENTRY));
return -1;
}
- buf = mem_malloc (sb.st_size + 1);
+ buf = p_new(char, sb.st_size + 1);
while (fgets (buf, sb.st_size + 1, fp))
nntp_parse_newsrc_line (news, buf);
- mem_free (&buf);
+ p_delete(&buf);
mx_unlock_file (news->newsrc, fileno (fp), 0);
fclose (fp);
set_option (OPTNEWSCACHE);
- mem_free (&news->cache);
+ p_delete(&news->cache);
snprintf (buf, sizeof (buf), "%s/.index", dir);
if (!(index = safe_fopen (buf, "a+")))
return 0;
ret = mutt_account_fromurl (acct, &url);
}
- mem_free (&c);
+ p_delete(&c);
return ret;
}
url.path = str_dup (line);
mutt_account_tourl (acct, &url);
url_ciss_tostring (&url, line, len, 0);
- mem_free (&url.path);
+ p_delete(&url.path);
}
/*
strcpy (p, server);
if ((nntp_parse_url (buf, &acct, file, sizeof (file))) < 0 || *file) {
- mem_free (&buf);
+ p_delete(&buf);
mutt_error (_("%s is an invalid newsserver specification!"), server);
return NULL;
}
- mem_free (&buf);
+ p_delete(&buf);
conn = mutt_conn_find (NULL, &acct);
if (!conn)
for (list = serv->list; list; list = list->next)
list->data = NULL;
mutt_free_list (&serv->list);
- mem_free (&serv->newsrc);
- mem_free (&serv->cache);
- mem_free (&serv);
+ p_delete(&serv->newsrc);
+ p_delete(&serv->cache);
+ p_delete(&serv);
return NULL;
}
nntp_clear_cacheindex (serv);
news->size = st.st_size;
news->mtime = st.st_mtime;
}
- mem_free (&buf);
+ p_delete(&buf);
return r;
}
nntp_cache_expand (buf, data->cache);
unlink (buf);
- mem_free (&data->cache);
+ p_delete(&data->cache);
data->lastCached = 0;
nntp_cache_expand (buf, ".index");
mutt_update_list_file (buf, data->nserv->conn->account.host, data->group,