rfc822_write_address (buf, buflen, AliasTable[t]->addr);
mutt_menuDestroy (&menu);
- safe_free ((void **) &AliasTable);
+ FREE (&AliasTable);
}
{
a_cur = a_list;
a_list = a_list->next;
- safe_free ((void **) &a_cur);
+ FREE (&a_cur);
}
/* remove any aliases marked for deletion */
b->parameter = NULL;
}
if (b->description) {
- safe_free ((void **) &a->description);
+ FREE (&a->description);
a->description = b->description;
b->description = NULL;
}
if (b->form_name)
{
- safe_free ((void **) &a->form_name);
+ FREE (&a->form_name);
a->form_name = b->form_name;
b->form_name = NULL;
}
b->filename, type));
}
if (tmp.subtype)
- safe_free ((void **) &tmp.subtype);
+ FREE (&tmp.subtype);
if (tmp.xtype)
- safe_free ((void **) &tmp.xtype);
+ FREE (&tmp.xtype);
}
}
}
for (c = 0; c < state->entrylen; c++)
{
- safe_free ((void **) &((state->entry)[c].name));
- safe_free ((void **) &((state->entry)[c].desc));
- safe_free ((void **) &((state->entry)[c].st));
+ FREE (&((state->entry)[c].name));
+ FREE (&((state->entry)[c].desc));
+ FREE (&((state->entry)[c].st));
}
#ifdef USE_IMAP
- safe_free ((void **) &state->folder);
+ FREE (&state->folder);
#endif
- safe_free ((void **) &state->entry);
+ FREE (&state->entry);
}
static int browser_compare_subject (const void *a, const void *b)
if (!imap_delete_mailbox (Context, mx))
{
/* free the mailbox from the browser */
- safe_free ((void **) &((state.entry)[nentry].name));
- safe_free ((void **) &((state.entry)[nentry].desc));
+ FREE (&((state.entry)[nentry].name));
+ FREE (&((state.entry)[nentry].desc));
/* and move all other entries up */
if (nentry+1 < state.entrylen)
memmove (state.entry + nentry, state.entry + nentry + 1,
{
regerror (err, rx, buf, sizeof (buf));
regfree (rx);
- safe_free ((void **) &rx);
+ FREE (&rx);
mutt_error ("%s", buf);
}
else
{
mutt_str_replace (&Mask.pattern, buf);
regfree (Mask.rx);
- safe_free ((void **) &Mask.rx);
+ FREE (&Mask.rx);
Mask.rx = rx;
Mask.not = not;
{
for (tmp = &Incoming; *tmp;)
{
- safe_free((void **)&((*tmp)->path));
+ FREE (&((*tmp)->path));
tmp1=(*tmp)->next;
- safe_free((void **)tmp);
+ FREE (tmp);
*tmp=tmp1;
}
return 0;
{
if(*tmp)
{
- safe_free((void **)&((*tmp)->path));
+ FREE (&((*tmp)->path));
tmp1=(*tmp)->next;
- safe_free((void **)tmp);
+ FREE (tmp);
*tmp=tmp1;
}
continue;
*ob = '\0';
- safe_free ((void **) ps);
+ FREE (ps);
*ps = buf;
mutt_str_adjust (ps);
if (fc->cd != (iconv_t)-1)
iconv_close (fc->cd);
- safe_free ((void **) _fc);
+ FREE (_fc);
}
regfree(&tmp->rx);
mutt_pattern_free(&tmp->color_pattern);
- safe_free((void **)&tmp->pattern);
- safe_free((void **)l);
+ FREE (&tmp->pattern);
+ FREE (l);
}
void ci_start_color (void)
if (p == ColorList)
{
ColorList = ColorList->next;
- safe_free ((void **) &p);
+ FREE (&p);
return;
}
q = ColorList;
if (q->next == p)
{
q->next = p->next;
- safe_free ((void **) &p);
+ FREE (&p);
return;
}
q = q->next;
idx[x]->content->next = NULL;
idx[x]->content->parts = NULL;
mutt_free_body (&(idx[x]->content));
- safe_free ((void **) &idx[x]->tree);
- safe_free ((void **) &idx[x]);
+ FREE (&idx[x]->tree);
+ FREE (&idx[x]);
for (; x < *idxlen - 1; x++)
idx[x] = idx[x+1];
menu->max = --(*idxlen);
if (idxlen && idx[idxlen - 1]->content->next)
{
for (i = 0; i < idxlen; i++)
- safe_free ((void **) &idx[i]);
+ FREE (&idx[i]);
idxlen = 0;
idx = mutt_gen_attach_list (msg->content, -1, idx, &idxlen, &idxmax, 0, 1);
menu->data = idx;
menu->redraw |= REDRAW_INDEX;
}
else
- safe_free ((void **) &idx[idxlen]);
+ FREE (&idx[idxlen]);
menu->redraw |= REDRAW_STATUS;
{
error = 1;
mutt_error (_("Unable to attach %s!"), att);
- safe_free ((void **) &idx[idxlen]);
+ FREE (&idx[idxlen]);
}
}
if (!ctx->msgcount)
{
mx_close_mailbox (ctx, NULL);
- safe_free ((void **) &ctx);
+ FREE (&ctx);
mutt_error _("No messages in that folder.");
break;
}
else
{
mutt_error _("Unable to attach!");
- safe_free ((void **) &idx[idxlen]);
+ FREE (&idx[idxlen]);
}
}
}
mx_close_mailbox (Context, NULL);
else
mx_fastclose_mailbox (Context);
- safe_free ((void **) &Context);
+ FREE (&Context);
/* go back to the folder we started from */
Context = this;
if (!(fp = safe_fopen (fname, "w")))
{
mutt_error (_("Can't create file %s"), fname);
- safe_free ((void **) &idx[idxlen]);
+ FREE (&idx[idxlen]);
continue;
}
fclose (fp);
idx[idxlen]->content->next = NULL;
idx[idxlen]->content->parts = NULL;
mutt_free_body (&idx[idxlen]->content);
- safe_free ((void **) &idx[idxlen]->tree);
- safe_free ((void **) &idx[idxlen]);
+ FREE (&idx[idxlen]->tree);
+ FREE (&idx[idxlen]);
}
- safe_free ((void **) &idx);
+ FREE (&idx);
idxlen = 0;
idxmax = 0;
r = -1;
{
msg->content = idx[0]->content;
for (i = 0; i < idxlen; i++)
- safe_free ((void **) &idx[i]);
+ FREE (&idx[i]);
}
else
msg->content = NULL;
- safe_free ((void **) &idx);
+ FREE (&idx);
return (r);
}
/* Free in a separate loop to be sure that all headers are freed
* in case of error. */
for (x = 0; x < hdr_count; x++)
- safe_free ((void **) &headers[x]);
- safe_free ((void **) &headers);
+ FREE (&headers[x]);
+ FREE (&headers);
if (error)
return (-1);
state_attach_puts (_("[-- The following data is signed --]\n\n"), s);
- safe_free((void **) &signatures);
+ FREE (&signatures);
}
else
state_attach_puts (_("[-- Warning: Can't find any signatures. --]\n\n"), s);
if (!Context->path)
{
/* fatal error occurred */
- safe_free ((void **) &Context);
+ FREE (&Context);
menu->redraw = REDRAW_FULL;
}
/* check for a fatal error, or all messages deleted */
if (!Context->path)
- safe_free ((void **) &Context);
+ FREE (&Context);
/* if we were in the pager, redisplay the message */
if (menu->menu == MENU_PAGER)
menu->redraw = REDRAW_INDEX | REDRAW_STATUS;
break;
}
- safe_free ((void **) &Context);
+ FREE (&Context);
}
mutt_sleep (0);
if (Context)
{
mx_fastclose_mailbox (Context);
- safe_free ((void **) &Context);
+ FREE (&Context);
}
done = 1;
}
memcpy (state->wbuf + state->curpos, savebuf, savelen * sizeof (wchar_t));
state->lastchar = state->curpos + savelen;
- safe_free ((void **) &savebuf);
+ FREE (&savebuf);
}
/*
bye:
- safe_free ((void **) &tempbuf);
+ FREE (&tempbuf);
return rv;
}
{
if (!esp) return;
- safe_free ((void **) &(*esp)->wbuf);
- safe_free ((void **) esp);
+ FREE (&(*esp)->wbuf);
+ FREE (esp);
}
/*
else if (ob-buf == n && (buf[n] = 0, strlen (buf) < n))
memcpy (uid, buf, n);
}
- safe_free ((void **) &buf);
+ FREE (&buf);
iconv_close (cd);
}
}
elem = elem->next;
if (destroy)
destroy (tmp->data);
- safe_free ((void **) &tmp);
+ FREE (&tmp);
}
}
- safe_free ((void **) &pptr->table);
- safe_free ((void **) ptr);
+ FREE (&pptr->table);
+ FREE (ptr);
}
if (h->hist)
{
for (i = 0 ; i < OldSize ; i ++)
- safe_free ((void **) &h->hist[i]);
- safe_free ((void **) &h->hist);
+ FREE (&h->hist[i]);
+ FREE (&h->hist);
}
}
{
regerror (rc, rx, err->data, err->dsize);
regfree (rx);
- safe_free ((void **) &rx);
+ FREE (&rx);
goto error;
}
}
rc = mutt_socket_write_d (idata->conn, out,
flags & IMAP_CMD_PASS ? IMAP_LOG_PASS : IMAP_LOG_CMD);
- safe_free ((void**) &out);
+ FREE (&out);
if (rc < 0)
{
}
}
- safe_free ((void**) &hdrs);
+ FREE (&hdrs);
return count;
}
if (idata->cache[i].path)
{
unlink (idata->cache[i].path);
- safe_free ((void **) &idata->cache[i].path);
+ FREE (&idata->cache[i].path);
}
}
}
cache->path = safe_strdup (path);
if (!(msg->fp = safe_fopen (path, "w+")))
{
- safe_free ((void**) &cache->path);
+ FREE (&cache->path);
return -1;
}
/* this should be safe even if the list wasn't used */
mutt_free_list (&(((IMAP_HEADER_DATA*) *data)->keywords));
- safe_free (data);
+ FREE (data);
}
/* imap_set_flags: fill out the message header according to the flags from
return buf;
bail:
- safe_free ((void **) &buf);
+ FREE (&buf);
return 0;
}
if (u8len)
{
- safe_free ((void **) &buf);
+ FREE (&buf);
return 0;
}
return buf;
bail:
- safe_free ((void **) &buf);
+ FREE (&buf);
return 0;
}
char *t = safe_strdup (*s);
if (!mutt_convert_string (&t, Charset, "UTF-8", 0))
utf8_to_utf7 (t, strlen (t), s, 0);
- safe_free ((void **) &t);
+ FREE (&t);
}
}
char *t = utf7_to_utf8 (*s, strlen (*s), 0, 0);
if (t && !mutt_convert_string (&t, "UTF-8", Charset, 0))
{
- safe_free ((void **) s);
+ FREE (s);
*s = t;
}
}
imap_quote_string (dest, dlen, buf);
- safe_free ((void **) &buf);
+ FREE (&buf);
}
void imap_unmunge_mbox_name (char *s)
strncpy (s, buf, strlen (s));
}
- safe_free ((void **) &buf);
+ FREE (&buf);
}
/* imap_wordcasecmp: find word a in word list b */
{
if (ascii_strcasecmp (str, p->data) == 0)
{
- safe_free ((void **) &p->data);
+ FREE (&p->data);
if (last)
last->next = p->next;
else
(*l) = p->next;
- safe_free ((void **) &p);
+ FREE (&p);
}
else
{
if (ascii_strncasecmp (buf->data, tmp->data, keylen) == 0)
{
/* replace the old value */
- safe_free ((void **) &tmp->data);
+ FREE (&tmp->data);
tmp->data = buf->data;
memset (buf, 0, sizeof (BUFFER));
return 0;
if (DTYPE (MuttVars[idx].type) == DT_ADDR)
rfc822_free_address ((ADDRESS **) MuttVars[idx].data);
else
- safe_free ((void **) MuttVars[idx].data);
+ FREE (MuttVars[idx].data);
}
else if (query || *s->dptr != '=')
{
rc = -1;
}
FREE (&token.data);
- safe_free ((void **) &linebuf);
+ FREE (&linebuf);
fclose (f);
if (pid != -1)
mutt_wait_filter (pid);
void mutt_str_replace (char **p, const char *s)
{
- safe_free ((void **) p);
+ FREE (p);
*p = safe_strdup (s);
}
{
if (fgets (s + offset, *size - offset, fp) == NULL)
{
- safe_free ((void **) &s);
+ FREE (&s);
return NULL;
}
if ((ch = strchr (s + offset, '\n')) != NULL)
}
}
- safe_free ((void **) &bodytext);
+ FREE (&bodytext);
if (attach)
{
{
mutt_index_menu ();
if (Context)
- safe_free ((void **)&Context);
+ FREE (&Context);
}
mutt_endwin (Errorbuf);
}
ctx->hdrs[i]->index = j++;
}
}
- safe_free ((void **) &newOffset);
- safe_free ((void **) &oldOffset);
+ FREE (&newOffset);
+ FREE (&oldOffset);
unlink (tempfile); /* remove partial copy of the mailbox */
mutt_unblock_signals ();
Sort = save_sort; /* Restore the default value. */
mbox_unlock_mailbox (ctx);
mutt_unblock_signals ();
- safe_free ((void **) &newOffset);
- safe_free ((void **) &oldOffset);
+ FREE (&newOffset);
+ FREE (&oldOffset);
if ((ctx->fp = freopen (ctx->path, "r", ctx->fp)) == NULL)
{
if (ctx->subj_hash)
hash_destroy (&ctx->subj_hash, NULL);
mutt_clear_threads (ctx);
- safe_free ((void **) &ctx->v2r);
+ FREE (&ctx->v2r);
if (ctx->readonly)
{
for (i = 0; i < ctx->msgcount; i++)
mutt_free_header (&(ctx->hdrs[i])); /* nothing to do! */
- safe_free ((void **) &ctx->hdrs);
+ FREE (&ctx->hdrs);
}
else
{
/* free the old headers */
for (j = 0; j < old_msgcount; j++)
mutt_free_header (&(old_hdrs[j]));
- safe_free ((void **) &old_hdrs);
+ FREE (&old_hdrs);
ctx->quiet = 0;
return (-1);
msg_mod = 1;
}
}
- safe_free ((void **) &old_hdrs);
+ FREE (&old_hdrs);
}
ctx->quiet = 0;
{
int i;
- safe_free ((void **) &(*p)->searchBuf);
+ FREE (&(*p)->searchBuf);
if ((*p)->dialog)
{
for (i=0; i < (*p)->max; i++)
- safe_free ((void **) &(*p)->dialog[i]);
+ FREE (&(*p)->dialog[i]);
- safe_free ((void **) (*p)->dialog);
+ FREE ((*p)->dialog);
}
- safe_free ((void **) p);
+ FREE (p);
}
#define M_SEARCH_UP 1
static void mhs_free_sequences (struct mh_sequences *mhs)
{
- safe_free ((void **) &mhs->flags);
+ FREE (&mhs->flags);
}
static short mhs_check (struct mh_sequences *mhs, int i)
}
}
- safe_free ((void **) &buff);
+ FREE (&buff);
safe_fclose (&fp);
}
unlink (tmpfname);
}
- safe_free ((void **) &tmpfname);
+ FREE (&tmpfname);
}
static void mh_sequences_add_one (CONTEXT * ctx, int n, short unseen,
}
}
safe_fclose (&ofp);
- safe_free ((void **) &buff);
+ FREE (&buff);
if (!unseen_done && unseen)
fprintf (nfp, "%s: %d\n", NONULL (MhUnseen), n);
if (safe_rename (tmpfname, sequences) != 0)
unlink (tmpfname);
- safe_free ((void **) &tmpfname);
+ FREE (&tmpfname);
}
static void mh_update_maildir (struct maildir *md, struct mh_sequences *mhs)
if (!md || !*md)
return;
- safe_free ((void **) &(*md)->canon_fname);
+ FREE (&(*md)->canon_fname);
if ((*md)->h)
mutt_free_header (&(*md)->h);
- safe_free ((void **) md);
+ FREE (md);
}
static void maildir_free_maildir (struct maildir **md)
}
if (q == h->maildir_flags)
- safe_free ((void **) &h->maildir_flags);
+ FREE (&h->maildir_flags);
else if (q)
*q = '\0';
}
safe_fclose (&fp);
if (safe_rename (tmp, buf) == -1)
unlink (tmp);
- safe_free ((void **) &tmp);
+ FREE (&tmp);
}
}
X509_free (data->cert);
SSL_free (data->ssl);
SSL_CTX_free (data->ctx);
- safe_free ((void **) &conn->sockdata);
+ FREE (&conn->sockdata);
}
return raw_socket_close (conn);
PR_Close (sockdata->fd);
if (sockdata->db)
CERT_ClosePermCertDB (sockdata->db);
- safe_free ((void **) &sockdata);
+ FREE (&sockdata);
}
return -1;
}
if (sockdata->db)
CERT_ClosePermCertDB (sockdata->db);
/* free up the memory we used for this connection specific to NSS. */
- safe_free ((void **) &con->sockdata);
+ FREE (&con->sockdata);
return 0;
}
mutt_free_parameter (&b->parameter);
if (b->unlink && b->filename)
unlink (b->filename);
- safe_free ((void **) &b->filename);
- safe_free ((void **) &b->content);
- safe_free ((void **) &b->xtype);
- safe_free ((void **) &b->subtype);
- safe_free ((void **) &b->description);
- safe_free ((void **) &b->form_name);
+ FREE (&b->filename);
+ FREE (&b->content);
+ FREE (&b->xtype);
+ FREE (&b->subtype);
+ FREE (&b->description);
+ FREE (&b->form_name);
if (b->hdr)
{
if (b->parts)
mutt_free_body (&b->parts);
- safe_free ((void **) &b);
+ FREE (&b);
}
*p = 0;
while (t)
{
- safe_free ((void **) &t->attribute);
- safe_free ((void **) &t->value);
+ FREE (&t->attribute);
+ FREE (&t->value);
o = t;
t = t->next;
- safe_free ((void **) &o);
+ FREE (&o);
}
*p = 0;
}
{
p = *list;
*list = (*list)->next;
- safe_free ((void **) &p->data);
- safe_free ((void **) &p);
+ FREE (&p->data);
+ FREE (&p);
}
}
if(!h || !*h) return;
mutt_free_envelope (&(*h)->env);
mutt_free_body (&(*h)->content);
- safe_free ((void **) &(*h)->maildir_flags);
- safe_free ((void **) &(*h)->tree);
- safe_free ((void **) &(*h)->path);
+ FREE (&(*h)->maildir_flags);
+ FREE (&(*h)->tree);
+ FREE (&(*h)->path);
#ifdef MIXMASTER
mutt_free_list (&(*h)->chain);
#endif
#if defined USE_POP || defined USE_IMAP
- safe_free ((void**) &(*h)->data);
+ FREE (&(*h)->data);
#endif
- safe_free ((void **) h);
+ FREE (h);
}
/* returns true if the header contained in "s" is in list "t" */
rfc822_free_address (&(*p)->from);
rfc822_free_address (&(*p)->reply_to);
rfc822_free_address (&(*p)->mail_followup_to);
- safe_free ((void **) &(*p)->subject);
- safe_free ((void **) &(*p)->message_id);
- safe_free ((void **) &(*p)->supersedes);
- safe_free ((void **) &(*p)->date);
+ FREE (&(*p)->subject);
+ FREE (&(*p)->message_id);
+ FREE (&(*p)->supersedes);
+ FREE (&(*p)->date);
mutt_free_list (&(*p)->references);
mutt_free_list (&(*p)->in_reply_to);
mutt_free_list (&(*p)->userhdrs);
- safe_free ((void **) p);
+ FREE (p);
}
void mutt_mktemp (char *s)
{
t = *p;
*p = (*p)->next;
- safe_free ((void **) &t->name);
+ FREE (&t->name);
rfc822_free_address (&t->addr);
- safe_free ((void **) &t);
+ FREE (&t);
}
}
s[len - 1] = 0;
mutt_endwin (NULL);
*thepid = mutt_create_filter (s, NULL, &f, NULL);
- safe_free ((void **) &s);
+ FREE (&s);
}
else
{
mutt_clear_threads (ctx);
for (i = 0; i < ctx->msgcount; i++)
mutt_free_header (&ctx->hdrs[i]);
- safe_free ((void **) &ctx->hdrs);
- safe_free ((void **) &ctx->v2r);
- safe_free ((void **) &ctx->path);
- safe_free ((void **) &ctx->pattern);
+ FREE (&ctx->hdrs);
+ FREE (&ctx->v2r);
+ FREE (&ctx->path);
+ FREE (&ctx->pattern);
if (ctx->limit_pattern)
mutt_pattern_free (&ctx->limit_pattern);
safe_fclose (&ctx->fp);
}
}
else
- safe_free ((void **) &msg);
+ FREE (&msg);
return msg;
}
h2 = hash_find (ctx->id_hash, h->env->supersedes);
- /* safe_free (&h->env->supersedes); should I ? */
+ /* FREE (&h->env->supersedes); should I ? */
if (h2)
{
h2->superseded = 1;
cleanup_quote (&((*QuoteList)->down));
ptr = (*QuoteList)->next;
if ((*QuoteList)->prefix)
- safe_free ((void **) &(*QuoteList)->prefix);
- safe_free ((void **) QuoteList);
+ FREE (&(*QuoteList)->prefix);
+ FREE (QuoteList);
*QuoteList = ptr;
}
lines = Resize->line;
redraw |= REDRAW_SIGWINCH;
- safe_free ((void **) &Resize);
+ FREE (&Resize);
}
#endif
safe_realloc ((void **)&(lineInfo[i].syntax),
sizeof (struct syntax_t));
if (SearchCompiled && lineInfo[i].search)
- safe_free ((void **) &(lineInfo[i].search));
+ FREE (&(lineInfo[i].search));
}
lastLine = 0;
for (i = 0; i < lastLine; i++)
{
if (lineInfo[i].search)
- safe_free ((void **) &(lineInfo[i].search));
+ FREE (&(lineInfo[i].search));
lineInfo[i].search_cnt = -1;
}
}
{
/* cleanup */
if (lineInfo[i].search)
- safe_free ((void **) &(lineInfo[i].search));
+ FREE (&(lineInfo[i].search));
lineInfo[i].search_cnt = -1;
}
SearchFlag = 0;
safe_realloc ((void **)&(lineInfo[i].syntax), sizeof (struct syntax_t));
if (SearchCompiled && lineInfo[i].search)
- safe_free ((void **) &(lineInfo[i].search));
+ FREE (&(lineInfo[i].search));
}
if (SearchCompiled)
for (i = 0; i < maxLine ; i++)
{
- safe_free ((void **) &(lineInfo[i].syntax));
+ FREE (&(lineInfo[i].syntax));
if (SearchCompiled && lineInfo[i].search)
- safe_free ((void **) &(lineInfo[i].search));
+ FREE (&(lineInfo[i].search));
}
if (SearchCompiled)
{
regfree (&SearchRE);
SearchCompiled = 0;
}
- safe_free ((void **) &lineInfo);
+ FREE (&lineInfo);
if (index)
mutt_menuDestroy(&index);
return (rc != -1 ? rc : 0);
*/
if (!(at = strchr (new, '@')) || strchr (at + 1, '@')
|| (in_reply_to && at - new <= 8))
- safe_free ((void **) &new);
+ FREE (&new);
else
{
t = (LIST *) safe_malloc (sizeof (LIST));
char *pc;
char *subtype;
- safe_free((void **)&ct->subtype);
+ FREE (&ct->subtype);
mutt_free_parameter(&ct->parameter);
/* First extract any existing parameters */
else if (!ascii_strcasecmp (line + 1, "essage-id"))
{
/* We add a new "Message-Id:" when building a message */
- safe_free ((void **) &e->message_id);
+ FREE (&e->message_id);
e->message_id = extract_message_id (p);
matched = 1;
}
{
regerror (r, pat->rx, err->data, err->dsize);
regfree (pat->rx);
- safe_free ((void **) &pat->rx);
+ FREE (&pat->rx);
return (-1);
}
return 0;
if (tmp->rx)
{
regfree (tmp->rx);
- safe_free ((void **) &tmp->rx);
+ FREE (&tmp->rx);
}
if (tmp->child)
mutt_pattern_free (&tmp->child);
- safe_free ((void **) &tmp);
+ FREE (&tmp);
}
}
if (op == M_LIMIT)
{
- safe_free ((void **) &Context->pattern);
+ FREE (&Context->pattern);
if (Context->limit_pattern)
mutt_pattern_free (&Context->limit_pattern);
if (!Context->vcount)
fputs (line, fpout);
fputc ('\n', fpout);
}
- safe_free ((void **) &line);
+ FREE (&line);
}
else
{
}
else if (r == -1)
{
- safe_free ((void **) &keylist);
+ FREE (&keylist);
rfc822_free_address (&tmp);
rfc822_free_address (&addr);
return NULL;
if ((key = pgp_ask_for_key (buf, q->mailbox,
KEYFLAG_CANENCRYPT, PGP_PUBRING)) == NULL)
{
- safe_free ((void **)&keylist);
+ FREE (&keylist);
rfc822_free_address (&tmp);
rfc822_free_address (&addr);
return NULL;
}
mutt_menuDestroy (&menu);
- safe_free ((void **) &KeyTable);
+ FREE (&KeyTable);
set_option (OPTNEEDREDRAW);
hints = mutt_add_list (hints, t);
}
- safe_free ((void **) &scratch);
+ FREE (&scratch);
return hints;
}
for (sp = *sigp; sp; sp = q)
{
q = sp->next;
- safe_free ((void **) &sp);
+ FREE (&sp);
}
*sigp = NULL;
{
q = up->next;
pgp_free_sig (&up->sigs);
- safe_free ((void **) &up->addr);
- safe_free ((void **) &up);
+ FREE (&up->addr);
+ FREE (&up);
}
*upp = NULL;
kp = *kpp;
pgp_free_uid (&kp->address);
- safe_free ((void **) &kp->keyid);
- safe_free ((void **) kpp);
+ FREE (&kp->keyid);
+ FREE (kpp);
}
pgp_key_t *pgp_remove_key (pgp_key_t ** klist, pgp_key_t * key)
void pgp_release_packet (void)
{
plen = 0;
- safe_free ((void **) &pbuf);
+ FREE (&pbuf);
}
bailout:
- safe_free ((void **) &p);
+ FREE (&p);
return NULL;
}
error_buf = safe_malloc (error_buf_len);
snprintf (error_buf, error_buf_len, "fopen: %s", ringfile);
perror (error_buf);
- safe_free ((void **) &error_buf);
+ FREE (&error_buf);
return;
}
pgp_free_key (&p);
}
- safe_free ((void **) &tmp);
+ FREE (&tmp);
}
FGETPOS(rfp,pos);
if (pop_data->cache[i].path)
{
unlink (pop_data->cache[i].path);
- safe_free ((void **) &pop_data->cache[i].path);
+ FREE (&pop_data->cache[i].path);
}
}
}
/* sasl_client_st(art|ep) allocate pc with malloc, expect me to
* free it */
- safe_free ((void *) &pc);
+ FREE (&pc);
}
}
{
PostCount = 0;
mx_close_mailbox (PostContext, NULL);
- safe_free ((void **) &PostContext);
+ FREE (&PostContext);
mutt_error _("No postponed messages.");
return (-1);
}
else if ((h = select_msg ()) == NULL)
{
mx_close_mailbox (PostContext, NULL);
- safe_free ((void **) &PostContext);
+ FREE (&PostContext);
return (-1);
}
if (mutt_prepare_template (NULL, PostContext, hdr, h, 0) < 0)
{
mx_fastclose_mailbox (PostContext);
- safe_free ((void **) &PostContext);
+ FREE (&PostContext);
return (-1);
}
mx_close_mailbox (PostContext, NULL);
set_quadoption (OPT_DELETE, opt_delete);
- safe_free ((void **) &PostContext);
+ FREE (&PostContext);
for (tmp = hdr->env->userhdrs; tmp; )
{
newhdr->content->length = hdr->content->length;
mutt_parse_part (fp, newhdr->content);
- safe_free ((void **) &newhdr->env->message_id);
- safe_free ((void **) &newhdr->env->mail_followup_to); /* really? */
+ FREE (&newhdr->env->message_id);
+ FREE (&newhdr->env->mail_followup_to); /* really? */
#ifdef HAVE_PGP
/* decrypt pgp/mime encoded messages */
}
}
}
- safe_free ((void **) &buf);
+ FREE (&buf);
fclose (fp);
if (mutt_wait_filter (thepid))
{
while (queryp)
{
rfc822_free_address (&queryp->addr);
- safe_free ((void **)&queryp->name);
- safe_free ((void **)&queryp->other);
+ FREE (&queryp->name);
+ FREE (&queryp->other);
results = queryp->next;
- safe_free ((void **)&queryp);
+ FREE (&queryp);
queryp = results;
}
results = newresults;
- safe_free ((void **) &QueryTable);
+ FREE (&QueryTable);
}
else
{
while (queryp)
{
rfc822_free_address (&queryp->addr);
- safe_free ((void **)&queryp->name);
- safe_free ((void **)&queryp->other);
+ FREE (&queryp->name);
+ FREE (&queryp->other);
results = queryp->next;
- safe_free ((void **)&queryp);
+ FREE (&queryp);
queryp = results;
}
- safe_free ((void **) &QueryTable);
+ FREE (&QueryTable);
/* tell whoever called me to redraw the screen when I return */
set_option (OPTNEEDREDRAW);
continue;
if (idx[idxmax]->content && idx[idxmax]->content->deleted)
hdr->attach_del = 1;
- safe_free ((void **) &idx[idxmax]->tree);
- safe_free ((void **) &idx[idxmax]);
+ FREE (&idx[idxmax]->tree);
+ FREE (&idx[idxmax]);
}
if (hdr->attach_del)
hdr->changed = 1;
- safe_free ((void **) &idx);
+ FREE (&idx);
idxmax = 0;
static void mix_free_remailer (REMAILER **r)
{
- safe_free ((void **) &(*r)->shortname);
- safe_free ((void **) &(*r)->addr);
- safe_free ((void **) &(*r)->ver);
+ FREE (&(*r)->shortname);
+ FREE (&(*r)->addr);
+ FREE (&(*r)->ver);
- safe_free ((void **) r);
+ FREE (r);
}
/* parse the type2.list as given by mixmaster -T */
for (i = 0; type2_list[i]; i++)
mix_free_remailer (&type2_list[i]);
- safe_free ((void **) type2_list);
+ FREE (type2_list);
}
}
mix_free_type2_list (&type2_list);
- safe_free ((void **) &coords);
- safe_free ((void **) &chain);
+ FREE (&coords);
+ FREE (&chain);
}
/* some safety checks before piping the message to mixmaster */
/* reset */
if (entry)
{
- safe_free ((void **) &entry->command);
- safe_free ((void **) &entry->composecommand);
- safe_free ((void **) &entry->composetypecommand);
- safe_free ((void **) &entry->editcommand);
- safe_free ((void **) &entry->printcommand);
- safe_free ((void **) &entry->nametemplate);
- safe_free ((void **) &entry->convert);
+ FREE (&entry->command);
+ FREE (&entry->composecommand);
+ FREE (&entry->composetypecommand);
+ FREE (&entry->editcommand);
+ FREE (&entry->printcommand);
+ FREE (&entry->nametemplate);
+ FREE (&entry->convert);
entry->needsterminal = 0;
entry->copiousoutput = 0;
}
} /* while (!found && (buf = mutt_read_line ())) */
fclose (fp);
} /* if ((fp = fopen ())) */
- safe_free ((void **) &buf);
+ FREE (&buf);
return found;
}
{
rfc1524_entry *p = *entry;
- safe_free((void **)&p->command);
- safe_free((void **)&p->testcommand);
- safe_free((void **)&p->composecommand);
- safe_free((void **)&p->composetypecommand);
- safe_free((void **)&p->editcommand);
- safe_free((void **)&p->printcommand);
- safe_free((void **)&p->nametemplate);
- safe_free((void **)entry);
+ FREE (&p->command);
+ FREE (&p->testcommand);
+ FREE (&p->composecommand);
+ FREE (&p->composetypecommand);
+ FREE (&p->editcommand);
+ FREE (&p->printcommand);
+ FREE (&p->nametemplate);
+ FREE (entry);
}
/*
if (n == (size_t)(-1) || iconv (cd, 0, 0, &ob, &obl) == (size_t)(-1))
{
e = errno;
- safe_free ((void **) &buf);
+ FREE (&buf);
iconv_close (cd);
errno = e;
return (size_t)(-1);
if (!tocode || n < bestn)
{
bestn = n;
- safe_free ((void **) &tocode);
+ FREE (&tocode);
tocode = t;
if (d)
{
- safe_free ((void **) &e);
+ FREE (&e);
e = s;
}
else
- safe_free ((void **) &s);
+ FREE (&s);
elen = slen;
if (!bestn)
break;
}
else
{
- safe_free ((void **) &t);
- safe_free ((void **) &s);
+ FREE (&t);
+ FREE (&s);
}
}
if (tocode)
bufpos += wlen;
memcpy (buf + bufpos, t1, u + ulen - t1);
- safe_free ((void **) &tocode1);
- safe_free ((void **) &u);
+ FREE (&tocode1);
+ FREE (&u);
buf[buflen] = '\0';
Charset, charsets, &e, &elen,
encode_specials ? RFC822Specials : NULL);
- safe_free ((void **) pd);
+ FREE (pd);
*pd = e;
}
enc = ENCBASE64;
else
{
- safe_free ((void **) &charset);
- safe_free ((void **) &d0);
+ FREE (&charset);
+ FREE (&d0);
return (-1);
}
break;
if (charset)
mutt_convert_string (&d0, charset, Charset, M_ICONV_HOOK_FROM);
strfcpy (d, d0, len);
- safe_free ((void **) &charset);
- safe_free ((void **) &d0);
+ FREE (&charset);
+ FREE (&d0);
return (0);
}
}
*d = 0;
- safe_free ((void **) pd);
+ FREE (pd);
*pd = d0;
mutt_str_adjust (pd);
}
p->attribute = NULL;
p->value = NULL;
- safe_free ((void **) &p);
+ FREE (&p);
rfc2231_list_insert (&conthead, conttmp);
}
{
if (*p)
{
- safe_free ((void **) &(*p)->attribute);
- safe_free ((void **) &(*p)->value);
- safe_free ((void **) p);
+ FREE (&(*p)->attribute);
+ FREE (&(*p)->value);
+ FREE (p);
}
}
*t = '\0';
if (d != *pd)
- safe_free ((void **) &d);
- safe_free ((void **) pd);
+ FREE (&d);
+ FREE (pd);
*pd = e;
}
else if (d != *pd)
{
- safe_free ((void **) pd);
+ FREE (pd);
*pd = d;
}
- safe_free ((void **) &charset);
+ FREE (&charset);
return encode;
}
{
p = safe_malloc (mutt_strlen (addr->mailbox) + mutt_strlen (host) + 2);
sprintf (p, "%s@%s", addr->mailbox, host); /* __SPRINTF_CHECKED__ */
- safe_free ((void **) &addr->mailbox);
+ FREE (&addr->mailbox);
addr->mailbox = p;
}
}
last = tmp;
tmp = tmp->next;
mutt_pattern_free (&last->pat);
- safe_free ((void **) &last);
+ FREE (&last);
}
Score = NULL;
}
else
Score = tmp->next;
mutt_pattern_free (&tmp->pat);
- safe_free ((void **) &tmp);
+ FREE (&tmp);
/* there should only be one score per pattern, so we can stop here */
break;
}
if(signas)
{
- safe_free((void **) &PgpSignAs);
+ FREE (&PgpSignAs);
PgpSignAs = signas;
}
}
if (!ascii_strcasecmp (p->attribute, "boundary") && !strcmp (buffer, tmp))
snprintf (buffer, sizeof (buffer), "\"%s\"", tmp);
- safe_free ((void **)&tmp);
+ FREE (&tmp);
tmplen = mutt_strlen (buffer) + mutt_strlen (p->attribute) + 1;
tmp = safe_strdup (t);
encode = rfc2231_encode_string (&tmp);
rfc822_cat (buffer, sizeof (buffer), tmp, MimeSpecials);
- safe_free ((void **)&tmp);
+ FREE (&tmp);
fprintf (f, "; filename%s=%s", encode ? "*" : "", buffer);
}
}
iconv_close (cd[i]);
iconv_close (cd1);
- safe_free ((void **) &cd);
- safe_free ((void **) &infos);
- safe_free ((void **) &score);
- safe_free ((void **) &states);
+ FREE (&cd);
+ FREE (&infos);
+ FREE (&score);
+ FREE (&states);
return ret;
#else
tcode[cn] = 0;
break;
}
- safe_free ((void **) &fcode);
+ FREE (&fcode);
}
}
else
/* Free memory */
for (i = 0; i < ncodes; i++)
- safe_free ((void **) &tcode[i]);
+ FREE (&tcode[i]);
- safe_free ((void **) tcode);
+ FREE (tcode);
return ret;
}
mutt_canonical_charset (chsbuf, sizeof (chsbuf), tocode);
mutt_set_parameter ("charset", chsbuf, &b->parameter);
}
- safe_free ((void **) &tocode);
+ FREE (&tocode);
safe_fclose (&fp);
return info;
}
mutt_write_mime_body (a->parts, fpout);
cleanup:
- safe_free ((void **) &line);
+ FREE (&line);
if (fpin && !fp)
fclose (fpin);
mutt_set_encoding (a, info);
mutt_stamp_attachment(a);
- safe_free ((void **) &a->content);
+ FREE (&a->content);
a->content = info;
}
fputs (ref[refcnt]->data, f);
}
- safe_free ((void **) &ref);
+ FREE (&ref);
}
/* Note: all RFC2047 encoding should be done outside of this routine, except
sprintf (h->data + i, ": %s", NONULL (tmp)); /* __SPRINTF_CHECKED__ */
- safe_free ((void **) &tmp);
+ FREE (&tmp);
}
}
else if (pid == -1)
{
unlink (msg);
- safe_free ((void **) tempfile);
+ FREE (tempfile);
_exit (S_ERR);
}
if (SendmailWait && st == (0xff & EX_OK))
{
unlink (*tempfile); /* no longer needed */
- safe_free ((void **) tempfile);
+ FREE (tempfile);
}
}
else
if (SendmailWait > 0)
{
unlink (*tempfile);
- safe_free ((void **) tempfile);
+ FREE (tempfile);
}
}
{
/* the parent is already dead */
unlink (*tempfile);
- safe_free ((void **) tempfile);
+ FREE (tempfile);
}
_exit (st);
else fname = NULL;
mutt_menuDestroy (&menu);
- safe_free ((void**)&Table);
+ FREE (&Table);
set_option (OPTNEEDREDRAW);
if (fname) return fname;
{
found = 0;
ask = 0;
- safe_free((void **) &key);
+ FREE (&key);
key = NULL;
break;
}
choice = mutt_yesorno (prompt, M_NO);
if (choice == -1 || choice == M_NO)
{
- safe_free ((void **) &key);
+ FREE (&key);
key = NULL;
}
}
choice = mutt_yesorno (prompt, M_NO);
if (choice != M_YES)
{
- safe_free ((void **) &key);
+ FREE (&key);
key = NULL;
}
if (*SmimeKeyToUse &&
!mutt_strcasecmp (k, SmimeKeyToUse + mutt_strlen (SmimeKeys)+1))
{
- safe_free ((void **) &k);
+ FREE (&k);
return;
}
else smime_void_passphrase ();
if (mutt_strcasecmp (k, SmimeDefaultKey))
smime_void_passphrase ();
- safe_free ((void **) &k);
+ FREE (&k);
return;
}
if(!keyID)
{
mutt_message (_("No (valid) certificate found for %s."), q->mailbox);
- safe_free ((void **)&keylist);
+ FREE (&keylist);
rfc822_free_address (&tmp);
rfc822_free_address (&addr);
return NULL;
mutt_wait_filter (thepid);
mutt_unlink (certfile);
- safe_free((void **)&certfile);
+ FREE (&certfile);
}
fflush (fpout);
else
retval = 0;
mutt_unlink(certfile);
- safe_free((void **)&certfile);
+ FREE (&certfile);
}
else
mutt_any_key_to_continue(_("no certfile"));
if (linelen && !mutt_strcasecmp (line, "verification successful"))
badsig = 0;
- safe_free ((void **) &line);
+ FREE (&line);
}
}
line = mutt_read_line (line, &linelen, smimeerr, &lineno);
if (linelen && !mutt_strcasecmp (line, "verification successful"))
m->goodsig = 1;
- safe_free ((void **) &line);
+ FREE (&line);
}
else {
m->goodsig = p->goodsig;
tree->subtree_visible = 0;
if (tree->message)
{
- safe_free ((void **) &tree->message->tree);
+ FREE (&tree->message->tree);
if (VISIBLE (tree->message, ctx))
{
tree->deep = 1;
while (!tree->deep);
}
- safe_free ((void **) &pfx);
- safe_free ((void **) &arrow);
+ FREE (&pfx);
+ FREE (&arrow);
}
/* since we may be trying to attach as a pseudo-thread a THREAD that
oldlist = subjects;
subjects = subjects->next;
- safe_free ((void **) &oldlist);
+ FREE (&oldlist);
}
return (last);
}
else
{
Sort ^= SORT_REVERSE;
- safe_free ((void **) &array);
+ FREE (&array);
return (top);
}
}
}
}
- safe_free ((void **) &tmp);
+ FREE (&tmp);
return 0;
}