]> granicus.if.org Git - mutt/commitdiff
Replace safe_free calls by the FREE macro.
authorThomas Roessler <roessler@does-not-exist.org>
Tue, 10 Dec 2002 20:56:47 +0000 (20:56 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Tue, 10 Dec 2002 20:56:47 +0000 (20:56 +0000)
55 files changed:
addrbook.c
alias.c
attach.c
browser.c
buffy.c
charset.c
color.c
compose.c
copy.c
crypt.c
curs_main.c
enter.c
gnupgparse.c
hash.c
history.c
hook.c
imap/command.c
imap/imap.c
imap/message.c
imap/utf7.c
imap/util.c
init.c
lib.c
main.c
mbox.c
menu.c
mh.c
mutt_ssl.c
mutt_ssl_nss.c
muttlib.c
mx.c
pager.c
parse.c
pattern.c
pgp.c
pgpkey.c
pgplib.c
pgppacket.c
pgppubring.c
pop.c
pop_auth.c
postpone.c
query.c
recvattach.c
remailer.c
rfc1524.c
rfc2047.c
rfc2231.c
rfc822.c
score.c
send.c
sendlib.c
smime.c
thread.c
url.c

index cbc11c14964490324c3c0959d2a6ab4c2a414374..6a5036f583896d6c7f3e9e486f008bcfa6c4334b 100644 (file)
@@ -231,6 +231,6 @@ new_aliases:
     rfc822_write_address (buf, buflen, AliasTable[t]->addr);
 
   mutt_menuDestroy (&menu);
-  safe_free ((void **) &AliasTable);
+  FREE (&AliasTable);
   
 }
diff --git a/alias.c b/alias.c
index b31e9b5ed370745b71f087b70ddf6418f359f9b0..5e55191815c2b21bbdd782348c4c95e579c1c5b5 100644 (file)
--- a/alias.c
+++ b/alias.c
@@ -469,7 +469,7 @@ int mutt_alias_complete (char *s, size_t buflen)
   {
     a_cur = a_list;
     a_list = a_list->next;
-    safe_free ((void **) &a_cur);
+    FREE (&a_cur);
   }
 
   /* remove any aliases marked for deletion */
index 4e9bf5e6cc96e05b8e6191de5368e832fbe6868b..171929a4350bb30201cc1072c3be82fbbf42efa9 100644 (file)
--- a/attach.c
+++ b/attach.c
@@ -156,13 +156,13 @@ int mutt_compose_attachment (BODY *a)
              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;
            }
@@ -356,9 +356,9 @@ void mutt_check_lookup_list (BODY *b, char *type, int len)
         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);
     }
   }
 }
index 34778ac2c38a1cbb6dc9a30d6b21d569667218e3..61fe713af4c60e8a45559aabbfa100f8e1d1ec3e 100644 (file)
--- a/browser.c
+++ b/browser.c
@@ -60,14 +60,14 @@ static void destroy_state (struct browser_state *state)
 
   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)
@@ -889,8 +889,8 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num
            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,
@@ -995,14 +995,14 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num
          {
            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;
 
diff --git a/buffy.c b/buffy.c
index ac7400443688af2abc4f0062c1302b01107a9a7c..e0ef5d2ffe9ce1a2982748180bc6b55a344ba303 100644 (file)
--- a/buffy.c
+++ b/buffy.c
@@ -179,9 +179,9 @@ int mutt_parse_mailboxes (BUFFER *path, BUFFER *s, unsigned long data, BUFFER *e
     {
       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;
@@ -203,9 +203,9 @@ int mutt_parse_mailboxes (BUFFER *path, BUFFER *s, unsigned long data, BUFFER *e
     {
       if(*tmp)
       {
-        safe_free((void **)&((*tmp)->path));
+        FREE (&((*tmp)->path));
         tmp1=(*tmp)->next;
-        safe_free((void **)tmp);
+        FREE (tmp);
         *tmp=tmp1;
       }
       continue;
index 86e7a3c7c1ff423fad26b788073fa86270e1747c..65afc9e313b37e561d2bd52f4206e1bad6012e8e 100644 (file)
--- a/charset.c
+++ b/charset.c
@@ -440,7 +440,7 @@ int mutt_convert_string (char **ps, const char *from, const char *to, int flags)
 
     *ob = '\0';
 
-    safe_free ((void **) ps);
+    FREE (ps);
     *ps = buf;
     
     mutt_str_adjust (ps);
@@ -579,5 +579,5 @@ void fgetconv_close (FGETCONV **_fc)
 
   if (fc->cd != (iconv_t)-1)
     iconv_close (fc->cd);
-  safe_free ((void **) _fc);
+  FREE (_fc);
 }
diff --git a/color.c b/color.c
index 7a31588d3b5933c18999e58cd0c76ebfe94d3f26..2265730af56a072f8099a9613ca2c096bef80d20 100644 (file)
--- a/color.c
+++ b/color.c
@@ -124,8 +124,8 @@ static void mutt_free_color_line(COLOR_LINE **l,
   
   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)
@@ -275,7 +275,7 @@ void mutt_free_color (int fg, int bg)
       if (p == ColorList)
       {
        ColorList = ColorList->next;
-       safe_free ((void **) &p);
+       FREE (&p);
        return;
       }
       q = ColorList;
@@ -284,7 +284,7 @@ void mutt_free_color (int fg, int bg)
        if (q->next == p)
        {
          q->next = p->next;
-         safe_free ((void **) &p);
+         FREE (&p);
          return;
        }
        q = q->next;
index 8b28c813ad63af45484a59e9c0109af7712b2d49..22881d0dfbfa83f52b886a1cdc9d3930cfcb0a42 100644 (file)
--- a/compose.c
+++ b/compose.c
@@ -463,8 +463,8 @@ static int delete_attachment (MUTTMENU *menu, short *idxlen, int x)
   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);
@@ -723,7 +723,7 @@ int mutt_compose_menu (HEADER *msg,   /* structure for new message */
        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;
@@ -758,7 +758,7 @@ int mutt_compose_menu (HEADER *msg,   /* structure for new message */
          menu->redraw |= REDRAW_INDEX;
        }
        else
-         safe_free ((void **) &idx[idxlen]);
+         FREE (&idx[idxlen]);
 
        menu->redraw |= REDRAW_STATUS;
 
@@ -807,7 +807,7 @@ int mutt_compose_menu (HEADER *msg,   /* structure for new message */
            {
              error = 1;
              mutt_error (_("Unable to attach %s!"), att);
-             safe_free ((void **) &idx[idxlen]);
+             FREE (&idx[idxlen]);
            }
          }
          
@@ -861,7 +861,7 @@ int mutt_compose_menu (HEADER *msg,   /* structure for new message */
          if (!ctx->msgcount)
          {
            mx_close_mailbox (ctx, NULL);
-           safe_free ((void **) &ctx);
+           FREE (&ctx);
            mutt_error _("No messages in that folder.");
            break;
          }
@@ -904,7 +904,7 @@ int mutt_compose_menu (HEADER *msg,   /* structure for new message */
              else
              {
                mutt_error _("Unable to attach!");
-               safe_free ((void **) &idx[idxlen]);
+               FREE (&idx[idxlen]);
              }
            }
          }
@@ -914,7 +914,7 @@ int mutt_compose_menu (HEADER *msg,   /* structure for new message */
            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;
@@ -1166,7 +1166,7 @@ int mutt_compose_menu (HEADER *msg,   /* structure for new message */
          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);
@@ -1243,10 +1243,10 @@ int mutt_compose_menu (HEADER *msg,   /* structure for new message */
            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;
@@ -1389,12 +1389,12 @@ int mutt_compose_menu (HEADER *msg,   /* structure for new message */
   {
     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);
 }
diff --git a/copy.c b/copy.c
index 62a4f3542efe5d679c34c7eeee779d71bc00b937..b99ad9422d62c05e1f8ea711188157dbb6ff383e 100644 (file)
--- a/copy.c
+++ b/copy.c
@@ -261,8 +261,8 @@ mutt_copy_hdr (FILE *in, FILE *out, long off_start, long off_end, int flags,
   /* 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);
diff --git a/crypt.c b/crypt.c
index 95b1fee91bd426d3a3164af962a81dfed197db63..d08ee7a0041ca238cae1c60f6284113638a4fcf4 100644 (file)
--- a/crypt.c
+++ b/crypt.c
@@ -770,7 +770,7 @@ void mutt_signed_handler (BODY *a, STATE *s)
       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);
index 599b5b0a1b9e161c1e4ca3eac5a6b852ee68ea4d..08b9f30eb3e32b48a7a2209324871ae8a5d4d6f8 100644 (file)
@@ -481,7 +481,7 @@ int mutt_index_menu (void)
        if (!Context->path)
        {
          /* fatal error occurred */
-         safe_free ((void **) &Context);
+         FREE (&Context);
          menu->redraw = REDRAW_FULL;
        }
 
@@ -978,7 +978,7 @@ int mutt_index_menu (void)
 
        /* 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)
@@ -1038,7 +1038,7 @@ int mutt_index_menu (void)
            menu->redraw = REDRAW_INDEX | REDRAW_STATUS;
            break;
          }
-         safe_free ((void **) &Context);
+         FREE (&Context);
        }
 
         mutt_sleep (0);
@@ -1109,7 +1109,7 @@ int mutt_index_menu (void)
          if (Context)
          {
            mx_fastclose_mailbox (Context);
-           safe_free ((void **) &Context);
+           FREE (&Context);
          }
          done = 1;
        }
diff --git a/enter.c b/enter.c
index 4cef35f6db08747e7bf49ed76b11c541a6b88ef6..a5bf5a9d284760b4d86ea19ff7d9a9fed9f06662 100644 (file)
--- a/enter.c
+++ b/enter.c
@@ -165,7 +165,7 @@ static void replace_part (ENTER_STATE *state, size_t from, char *buf)
   memcpy (state->wbuf + state->curpos, savebuf, savelen * sizeof (wchar_t));
   state->lastchar = state->curpos + savelen;
 
-  safe_free ((void **) &savebuf);
+  FREE (&savebuf);
 }
 
 /*
@@ -686,7 +686,7 @@ self_insert:
   
   bye:
   
-  safe_free ((void **) &tempbuf);
+  FREE (&tempbuf);
   return rv;
 }
 
@@ -694,8 +694,8 @@ void mutt_free_enter_state (ENTER_STATE **esp)
 {
   if (!esp) return;
   
-  safe_free ((void **) &(*esp)->wbuf);
-  safe_free ((void **) esp);
+  FREE (&(*esp)->wbuf);
+  FREE (esp);
 }
 
 /*
index 01a0a6b55dd9d5c91fdcdc7c24a8e45dfc8eb1f5..ad8259c3bcdc2fbd9d80279cc16ff5393c5a1d35 100644 (file)
@@ -107,7 +107,7 @@ static void fix_uid (char *uid)
       else if (ob-buf == n && (buf[n] = 0, strlen (buf) < n))
        memcpy (uid, buf, n);
     }
-    safe_free ((void **) &buf);
+    FREE (&buf);
     iconv_close (cd);
   }
 }
diff --git a/hash.c b/hash.c
index a9b7b5d907cc99c674a7ffba75619a2cba756cf5..c9037ca1b07657248a348b29a2d2ed77dbf41b7b 100644 (file)
--- a/hash.c
+++ b/hash.c
@@ -146,9 +146,9 @@ void hash_destroy (HASH **ptr, void (*destroy) (void *))
       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);
 }
index 5130a7f03a71144037bc34f9615f78f3cb2fb869..1e9743fbb5a080a3ee1ea137b79641141e871e99 100644 (file)
--- a/history.c
+++ b/history.c
@@ -40,8 +40,8 @@ static void init_history (struct history *h)
     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);
     }
   }
   
diff --git a/hook.c b/hook.c
index dbb62d8f74cb9aa8f14e04b258016d9d0bf366d9..c1091219ea506eef3e571c2a468884bebd32257c 100644 (file)
--- a/hook.c
+++ b/hook.c
@@ -165,7 +165,7 @@ int mutt_parse_hook (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err)
     {
       regerror (rc, rx, err->data, err->dsize);
       regfree (rx);
-      safe_free ((void **) &rx);
+      FREE (&rx);
       goto error;
     }
   }
index bd01aa0e8ffa0bdcdabc7edc609aba9495920c60..d1d3ef39a58720ed0208edb195b3f048f1f20f26 100644 (file)
@@ -192,7 +192,7 @@ int imap_exec (IMAP_DATA* idata, const char* cmd, int flags)
 
   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)
   {
index cfb2e354c87fc9838256a23c3bfa2e7902e59414..cf7258ec495664686d317f3eadc8a84565925eed 100644 (file)
@@ -869,7 +869,7 @@ int imap_make_msg_set (IMAP_DATA* idata, BUFFER* buf, int flag, int changed)
     }
   }
 
-  safe_free ((void**) &hdrs);
+  FREE (&hdrs);
 
   return count;
 }
@@ -1089,7 +1089,7 @@ void imap_close_mailbox (CONTEXT* ctx)
     if (idata->cache[i].path)
     {
       unlink (idata->cache[i].path);
-      safe_free ((void **) &idata->cache[i].path);
+      FREE (&idata->cache[i].path);
     }
   }
 }
index 289fc0d43158f0885946b2755de347c4a890f4a5..47136fdaba5fea4abad31654d78b9f7862480346 100644 (file)
@@ -254,7 +254,7 @@ int imap_fetch_message (MESSAGE *msg, CONTEXT *ctx, int msgno)
   cache->path = safe_strdup (path);
   if (!(msg->fp = safe_fopen (path, "w+")))
   {
-    safe_free ((void**) &cache->path);
+    FREE (&cache->path);
     return -1;
   }
 
@@ -676,7 +676,7 @@ void imap_free_header_data (void** data)
   /* 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
index fc68203b057efc640e0eba44500797ccfb814d9d..14211a07be9c2553cb0c40d91401f684ffc5cf20 100644 (file)
@@ -130,7 +130,7 @@ static char *utf7_to_utf8 (const char *u7, size_t u7len, char **u8,
   return buf;
 
  bail:
-  safe_free ((void **) &buf);
+  FREE (&buf);
   return 0;
 }
 
@@ -220,7 +220,7 @@ static char *utf8_to_utf7 (const char *u8, size_t u8len, char **u7,
 
   if (u8len)
   {
-    safe_free ((void **) &buf);
+    FREE (&buf);
     return 0;
   }
 
@@ -239,7 +239,7 @@ static char *utf8_to_utf7 (const char *u8, size_t u8len, char **u7,
   return buf;
 
  bail:
-  safe_free ((void **) &buf);
+  FREE (&buf);
   return 0;
 }
 
@@ -250,7 +250,7 @@ void imap_utf7_encode (char **s)
     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);
   }
 }
 
@@ -261,7 +261,7 @@ void imap_utf7_decode (char **s)
     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;
     }
   }
index 2aa1471e5eb399dd1eebf0c9391271c2f03ae1ee..10d93cd9b4e268c6172ef482e4cdabe620af1d70 100644 (file)
@@ -508,7 +508,7 @@ void imap_munge_mbox_name (char *dest, size_t dlen, const char *src)
 
   imap_quote_string (dest, dlen, buf);
 
-  safe_free ((void **) &buf);
+  FREE (&buf);
 }
 
 void imap_unmunge_mbox_name (char *s)
@@ -524,7 +524,7 @@ 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 */
diff --git a/init.c b/init.c
index 93c30c88d391d67cf32e895ae4289d7c54460cc1..41710270e05662eafbe2aee2e3cadbfe76882406 100644 (file)
--- a/init.c
+++ b/init.c
@@ -342,12 +342,12 @@ static void remove_from_list (LIST **l, const char *str)
     {
       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
       {
@@ -611,7 +611,7 @@ static int parse_my_hdr (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err
       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;
@@ -902,7 +902,7 @@ static int parse_set (BUFFER *tmp, BUFFER *s, unsigned long data, BUFFER *err)
        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 != '=')
       {
@@ -1273,7 +1273,7 @@ static int source_rc (const char *rcfile, BUFFER *err)
         rc = -1;
   }
   FREE (&token.data);
-  safe_free ((void **) &linebuf);
+  FREE (&linebuf);
   fclose (f);
   if (pid != -1)
     mutt_wait_filter (pid);
diff --git a/lib.c b/lib.c
index a9dad9ded6730102605cec06012ec1834df7df1d..9e72d2cc25791739600fdeb7a4d54a01519aaa75 100644 (file)
--- a/lib.c
+++ b/lib.c
@@ -145,7 +145,7 @@ char *safe_strdup (const char *s)
 
 void mutt_str_replace (char **p, const char *s)
 {
-  safe_free ((void **) p);
+  FREE (p);
   *p = safe_strdup (s);
 }
 
@@ -451,7 +451,7 @@ char *mutt_read_line (char *s, size_t *size, FILE *fp, int *line)
   {
     if (fgets (s + offset, *size - offset, fp) == NULL)
     {
-      safe_free ((void **) &s);
+      FREE (&s);
       return NULL;
     }
     if ((ch = strchr (s + offset, '\n')) != NULL)
diff --git a/main.c b/main.c
index 40d1c15c9e7c10c6c47bc0ffe9b1c34f62475aef..93751302ce48a0107fd4e83d2f34d3699729e334 100644 (file)
--- a/main.c
+++ b/main.c
@@ -797,7 +797,7 @@ int main (int argc, char **argv)
       }
     }
 
-    safe_free ((void **) &bodytext);
+    FREE (&bodytext);
     
     if (attach)
     {
@@ -885,7 +885,7 @@ int main (int argc, char **argv)
     {
       mutt_index_menu ();
       if (Context)
-       safe_free ((void **)&Context);
+       FREE (&Context);
     }
     mutt_endwin (Errorbuf);
   }
diff --git a/mbox.c b/mbox.c
index fa0f22185311cbc0d5c396525b091c2b6f6a0730..c9635092523b2141bd08c6c9ba7407e085e17f53 100644 (file)
--- a/mbox.c
+++ b/mbox.c
@@ -991,8 +991,8 @@ int mbox_sync_mailbox (CONTEXT *ctx, int *index_hint)
       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. */
@@ -1020,8 +1020,8 @@ bail:  /* Come here in case of disaster */
   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)
   {
@@ -1085,12 +1085,12 @@ int mutt_reopen_mailbox (CONTEXT *ctx, int *index_hint)
   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
   {
@@ -1140,7 +1140,7 @@ int mutt_reopen_mailbox (CONTEXT *ctx, int *index_hint)
     /* 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);
@@ -1219,7 +1219,7 @@ int mutt_reopen_mailbox (CONTEXT *ctx, int *index_hint)
        msg_mod = 1;
       }
     }
-    safe_free ((void **) &old_hdrs);
+    FREE (&old_hdrs);
   }
 
   ctx->quiet = 0;
diff --git a/menu.c b/menu.c
index 9c288fad84a9e3996bf600c3718a2dd1c3996e3b..3e4e65fe62495463b970b3a5b1e958a506582a40 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -683,17 +683,17 @@ void mutt_menuDestroy (MUTTMENU **p)
 {
   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
diff --git a/mh.c b/mh.c
index ebe93e36411e9d2c269c91e87b11673b34270cc8..9db7a2fd179fdec5428d8fd194455f6b0a3fc141 100644 (file)
--- a/mh.c
+++ b/mh.c
@@ -81,7 +81,7 @@ static void mhs_alloc (struct mh_sequences *mhs, int i)
 
 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)
@@ -164,7 +164,7 @@ static void mh_read_sequences (struct mh_sequences *mhs, const char *path)
     }
   }
 
-  safe_free ((void **) &buff);
+  FREE (&buff);
   safe_fclose (&fp);
 }
 
@@ -366,7 +366,7 @@ void mh_update_sequences (CONTEXT * ctx)
     unlink (tmpfname);
   }
 
-  safe_free ((void **) &tmpfname);
+  FREE (&tmpfname);
 }
 
 static void mh_sequences_add_one (CONTEXT * ctx, int n, short unseen,
@@ -423,7 +423,7 @@ 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);
@@ -438,7 +438,7 @@ static void mh_sequences_add_one (CONTEXT * ctx, int n, short unseen,
   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)
@@ -470,11 +470,11 @@ static void maildir_free_entry (struct maildir **md)
   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)
@@ -539,7 +539,7 @@ static void maildir_parse_flags (HEADER * h, const char *path)
   }
   
   if (q == h->maildir_flags)
-    safe_free ((void **) &h->maildir_flags);
+    FREE (&h->maildir_flags);
   else if (q)
     *q = '\0';
 }
@@ -1622,7 +1622,7 @@ int mh_check_mailbox (CONTEXT * ctx, int *index_hint)
       safe_fclose (&fp);
       if (safe_rename (tmp, buf) == -1)
        unlink (tmp);
-      safe_free ((void **) &tmp);
+      FREE (&tmp);
     }
   }
 
index e9c2200da4882f53239a1d4eda235f925e995f59..d5add0fefdfee08b1e92c7fc6df383487ccf97e5 100644 (file)
@@ -355,7 +355,7 @@ static int ssl_socket_close (CONNECTION * conn)
     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);
index abd91fbaea7bdbfe242e5225d60a4d955b0380bd..9549d99f70f4a4eb9d2c81e13a82695fa1195dcd 100644 (file)
@@ -332,7 +332,7 @@ mutt_nss_socket_open (CONNECTION * con)
       PR_Close (sockdata->fd);
     if (sockdata->db)
       CERT_ClosePermCertDB (sockdata->db);
-    safe_free ((void **) &sockdata);
+    FREE (&sockdata);
   }
   return -1;
 }
@@ -348,7 +348,7 @@ mutt_nss_socket_close (CONNECTION * con)
   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;
 }
 
index 00605925f66c9967406f834dbbe633f2dbe7d5bb..d122814c9ac748d6d32c64cca2bce93a9ee3dbb9 100644 (file)
--- a/muttlib.c
+++ b/muttlib.c
@@ -183,12 +183,12 @@ void mutt_free_body (BODY **p)
       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)
     {
@@ -200,7 +200,7 @@ void mutt_free_body (BODY **p)
     if (b->parts)
       mutt_free_body (&b->parts);
 
-    safe_free ((void **) &b);
+    FREE (&b);
   }
 
   *p = 0;
@@ -213,11 +213,11 @@ void mutt_free_parameter (PARAMETER **p)
 
   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;
 }
@@ -250,8 +250,8 @@ void mutt_free_list (LIST **list)
   {
     p = *list;
     *list = (*list)->next;
-    safe_free ((void **) &p->data);
-    safe_free ((void **) &p);
+    FREE (&p->data);
+    FREE (&p);
   }
 }
 
@@ -269,16 +269,16 @@ void mutt_free_header (HEADER **h)
   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" */
@@ -662,14 +662,14 @@ void mutt_free_envelope (ENVELOPE **p)
   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)
@@ -686,9 +686,9 @@ void mutt_free_alias (ALIAS **p)
   {
     t = *p;
     *p = (*p)->next;
-    safe_free ((void **) &t->name);
+    FREE (&t->name);
     rfc822_free_address (&t->addr);
-    safe_free ((void **) &t);
+    FREE (&t);
   }
 }
 
@@ -1135,7 +1135,7 @@ FILE *mutt_open_read (const char *path, pid_t *thepid)
     s[len - 1] = 0;
     mutt_endwin (NULL);
     *thepid = mutt_create_filter (s, NULL, &f, NULL);
-    safe_free ((void **) &s);
+    FREE (&s);
   }
   else
   {
diff --git a/mx.c b/mx.c
index 716a5a439d84285f651acefbf2c830e756c5e7f9..4da78237071b17f7df1310d9ea4d45bedb35d8ce 100644 (file)
--- a/mx.c
+++ b/mx.c
@@ -757,10 +757,10 @@ void mx_fastclose_mailbox (CONTEXT *ctx)
   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);
@@ -1315,7 +1315,7 @@ MESSAGE *mx_open_new_message (CONTEXT *dest, HEADER *hdr, int flags)
     }
   }
   else
-    safe_free ((void **) &msg);
+    FREE (&msg);
 
   return msg;
 }
@@ -1594,7 +1594,7 @@ void mx_update_context (CONTEXT *ctx, int new_messages)
 
       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;
diff --git a/pager.c b/pager.c
index 568f20a3bd108b62f4a4c9ec9c1936e6430ce2b7..7f6c735c0f5027ee5ab2f2cbe3ee6d426a840266 100644 (file)
--- a/pager.c
+++ b/pager.c
@@ -384,8 +384,8 @@ cleanup_quote (struct q_class_t **QuoteList)
       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;
   }
 
@@ -1613,7 +1613,7 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t *extra)
        lines = Resize->line;
        redraw |= REDRAW_SIGWINCH;
 
-       safe_free ((void **) &Resize);
+       FREE (&Resize);
       }
 #endif
 
@@ -1796,7 +1796,7 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t *extra)
          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;
@@ -1993,7 +1993,7 @@ search_next:
          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;
          }
        }
@@ -2007,7 +2007,7 @@ search_next:
          {
            /* cleanup */
            if (lineInfo[i].search)
-             safe_free ((void **) &(lineInfo[i].search));
+             FREE (&(lineInfo[i].search));
            lineInfo[i].search_cnt = -1;
          }
          SearchFlag = 0;
@@ -2289,7 +2289,7 @@ search_next:
 
            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)
@@ -2596,16 +2596,16 @@ search_next:
   
   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);
diff --git a/parse.c b/parse.c
index 50c8a4543e6ea7433c1ddff0dc6c5ab8c6c635b1..f90fc726b89b91ba9670fa548dbc8ac991b93704 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -143,7 +143,7 @@ static LIST *mutt_parse_references (char *s, int in_reply_to)
        */
       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));
@@ -314,7 +314,7 @@ void mutt_parse_content_type (char *s, BODY *ct)
   char *pc;
   char *subtype;
 
-  safe_free((void **)&ct->subtype);
+  FREE (&ct->subtype);
   mutt_free_parameter(&ct->parameter);
 
   /* First extract any existing parameters */
@@ -1087,7 +1087,7 @@ int mutt_parse_rfc822_line (ENVELOPE *e, HEADER *hdr, char *line, char *p, short
     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;
     }
index 9552e8062f59f8b51c2df392c119718c44d4d25c..70cfaccba34d91ba63ffdffe2c6f9c1bcb9df972 100644 (file)
--- a/pattern.c
+++ b/pattern.c
@@ -266,7 +266,7 @@ int eat_regexp (pattern_t *pat, BUFFER *s, BUFFER *err)
   {
     regerror (r, pat->rx, err->data, err->dsize);
     regfree (pat->rx);
-    safe_free ((void **) &pat->rx);
+    FREE (&pat->rx);
     return (-1);
   }
   return 0;
@@ -708,11 +708,11 @@ void mutt_pattern_free (pattern_t **pat)
     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);
   }
 }
 
@@ -1205,7 +1205,7 @@ int mutt_pattern_func (int op, char *prompt)
 
   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)
diff --git a/pgp.c b/pgp.c
index 4f26ba5f1d481cf4d06c4b31e8684350eb451297..3528cd22c232706dbed4ab9fd844e02b465b2df0 100644 (file)
--- a/pgp.c
+++ b/pgp.c
@@ -123,7 +123,7 @@ static int pgp_copy_checksig (FILE *fpin, FILE *fpout)
       fputs (line, fpout);
       fputc ('\n', fpout);
     }
-    safe_free ((void **) &line);
+    FREE (&line);
   }
   else
   {
@@ -1090,7 +1090,7 @@ char *pgp_findKeys (ADDRESS *to, ADDRESS *cc, ADDRESS *bcc)
       }
       else if (r == -1)
       {
-       safe_free ((void **) &keylist);
+       FREE (&keylist);
        rfc822_free_address (&tmp);
        rfc822_free_address (&addr);
        return NULL;
@@ -1107,7 +1107,7 @@ char *pgp_findKeys (ADDRESS *to, ADDRESS *cc, ADDRESS *bcc)
       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;
index 2ef935af422ce91ae7f5ea4c74f6dffa0f47e57d..19c8e4688d46e6a1f27eba6d977b0a79352e7197 100644 (file)
--- a/pgpkey.c
+++ b/pgpkey.c
@@ -646,7 +646,7 @@ static pgp_key_t *pgp_select_key (pgp_key_t *keys,
   }
 
   mutt_menuDestroy (&menu);
-  safe_free ((void **) &KeyTable);
+  FREE (&KeyTable);
 
   set_option (OPTNEEDREDRAW);
   
@@ -795,7 +795,7 @@ static LIST *pgp_add_string_to_hints (LIST *hints, const char *str)
       hints = mutt_add_list (hints, t);
   }
 
-  safe_free ((void **) &scratch);
+  FREE (&scratch);
   return hints;
 }
 
index dd1b4751fa6fa47cdbeebec3aa98ddb16dcd8dd7..a9528a2911f826aaa38e6093cdda37b5cd4085f0 100644 (file)
--- a/pgplib.c
+++ b/pgplib.c
@@ -126,7 +126,7 @@ void pgp_free_sig (pgp_sig_t **sigp)
   for (sp = *sigp; sp; sp = q)
   {
     q = sp->next;
-    safe_free ((void **) &sp);
+    FREE (&sp);
   }
   
   *sigp = NULL;
@@ -142,8 +142,8 @@ void pgp_free_uid (pgp_uid_t ** upp)
   {
     q = up->next;
     pgp_free_sig (&up->sigs);
-    safe_free ((void **) &up->addr);
-    safe_free ((void **) &up);
+    FREE (&up->addr);
+    FREE (&up);
   }
 
   *upp = NULL;
@@ -177,8 +177,8 @@ static void _pgp_free_key (pgp_key_t ** kpp)
   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)
index caec05c3de25e74f8bf40ea72cf316f2b98f76ba..f6c64a5396000b657406f697cbdbcfb0d83ec005 100644 (file)
@@ -220,6 +220,6 @@ bail:
 void pgp_release_packet (void)
 {
   plen = 0;
-  safe_free ((void **) &pbuf);
+  FREE (&pbuf);
 }
 
index 7e8fd51fea8ab1ccead3f8d1bd6d0a19939727fa..892c9ded18372c2f0cc20d0ee59ca14eeb3cebd6 100644 (file)
@@ -258,7 +258,7 @@ static pgp_key_t *pgp_parse_pgp2_key (unsigned char *buff, size_t l)
 
 bailout:
 
-  safe_free ((void **) &p);
+  FREE (&p);
   return NULL;
 }
 
@@ -766,7 +766,7 @@ static void pgpring_find_candidates (char *ringfile, const char *hints[], int nh
     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;
   }
 
@@ -808,7 +808,7 @@ static void pgpring_find_candidates (char *ringfile, const char *hints[], int nh
        pgp_free_key (&p);
       }
 
-      safe_free ((void **) &tmp);
+      FREE (&tmp);
     }
 
     FGETPOS(rfp,pos);
diff --git a/pop.c b/pop.c
index 637dc26bea4f10cf0dfa6e6d5700a952d9137dd2..0be15c60415673da0450e5d48f5c0c284f1308a0 100644 (file)
--- a/pop.c
+++ b/pop.c
@@ -308,7 +308,7 @@ static void pop_clear_cache (POP_DATA *pop_data)
     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);
     }
   }
 }
index 8ca1cdf4be7d9872d24e44f20a8b1aa733289629..253883d7042ce601fb1e10ab7d314ad4d7648eda 100644 (file)
@@ -127,7 +127,7 @@ static pop_auth_res_t pop_auth_sasl (POP_DATA *pop_data, const char *method)
 
       /* sasl_client_st(art|ep) allocate pc with malloc, expect me to 
        * free it */
-      safe_free ((void *) &pc);
+      FREE (&pc);
     }
   }
 
index c739f504e3a5f463e06c37a45aef8fc0a13f99f6..60ad0193cac49165b3e08e28b3bbb49ae5bbc58f 100644 (file)
@@ -247,7 +247,7 @@ int mutt_get_postponed (CONTEXT *ctx, HEADER *hdr, HEADER **cur, char *fcc, size
   {
     PostCount = 0;
     mx_close_mailbox (PostContext, NULL);
-    safe_free ((void **) &PostContext);
+    FREE (&PostContext);
     mutt_error _("No postponed messages.");
     return (-1);
   }
@@ -260,14 +260,14 @@ int mutt_get_postponed (CONTEXT *ctx, HEADER *hdr, HEADER **cur, char *fcc, size
   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);
   }
 
@@ -283,7 +283,7 @@ int mutt_get_postponed (CONTEXT *ctx, HEADER *hdr, HEADER **cur, char *fcc, size
   mx_close_mailbox (PostContext, NULL);
   set_quadoption (OPT_DELETE, opt_delete);
 
-  safe_free ((void **) &PostContext);
+  FREE (&PostContext);
 
   for (tmp = hdr->env->userhdrs; tmp; )
   {
@@ -542,8 +542,8 @@ int mutt_prepare_template (FILE *fp, CONTEXT *ctx, HEADER *newhdr, HEADER *hdr,
   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 */
diff --git a/query.c b/query.c
index 3c6dde9e7361ede90799830b2a770f81096a6c06..8361d0832c664eb79b2a9a348f667b9bf077bff4 100644 (file)
--- a/query.c
+++ b/query.c
@@ -131,7 +131,7 @@ static QUERY *run_query (char *s, int quiet)
       }
     }
   }
-  safe_free ((void **) &buf);
+  FREE (&buf);
   fclose (fp);
   if (mutt_wait_filter (thepid))
   {
@@ -332,14 +332,14 @@ static void query_menu (char *buf, size_t buflen, QUERY *results, int retbuf)
                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
              {
@@ -487,13 +487,13 @@ static void query_menu (char *buf, size_t buflen, QUERY *results, int retbuf)
     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);
index 4ec18eb5257d1e7a9e5ad6ec9f84846026d4721c..0474f62e97884820ce7026aee474894267f6754c 100644 (file)
@@ -1150,12 +1150,12 @@ void mutt_view_attachments (HEADER *hdr)
            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;
 
 
index 490ecc5349f50811098bfe0286180b5c3276c571..e1fb9c9637a95f85b9920ae220c5fe2532b4f8f8 100644 (file)
@@ -118,11 +118,11 @@ static REMAILER *mix_new_remailer (void)
 
 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 */
@@ -212,7 +212,7 @@ static void mix_free_type2_list (REMAILER ***ttlp)
   for (i = 0; type2_list[i]; i++)
     mix_free_remailer (&type2_list[i]);
   
-  safe_free ((void **) type2_list);
+  FREE (type2_list);
 }
 
 
@@ -693,8 +693,8 @@ void mix_make_chain (LIST **chainp, int *redraw)
   }
   
   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 */
index f42106999946a1ab6da43552dd444f96fc283fa8..f028730fd1263f1f6b296a9b76a7e7ef3d0d124c 100644 (file)
--- a/rfc1524.c
+++ b/rfc1524.c
@@ -330,13 +330,13 @@ static int rfc1524_mailcap_parse (BODY *a,
        /* 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;
        }
@@ -344,7 +344,7 @@ static int rfc1524_mailcap_parse (BODY *a,
     } /* while (!found && (buf = mutt_read_line ())) */
     fclose (fp);
   } /* if ((fp = fopen ())) */
-  safe_free ((void **) &buf);
+  FREE (&buf);
   return found;
 }
 
@@ -357,14 +357,14 @@ void rfc1524_free_entry(rfc1524_entry **entry)
 {
   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);
 }
 
 /*
index e7c4d725ffb5d789033d64a08065749557ec1efd..759e3e3d23cd38b3b1dbde32aebcf5bba417f6f8 100644 (file)
--- a/rfc2047.c
+++ b/rfc2047.c
@@ -67,7 +67,7 @@ static size_t convert_string (ICONV_CONST char *f, size_t flen,
   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);
@@ -117,23 +117,23 @@ char *mutt_choose_charset (const char *fromcode, const char *charsets,
     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)
@@ -533,8 +533,8 @@ static int rfc2047_encode (ICONV_CONST char *d, size_t dlen, int col,
   bufpos += wlen;
   memcpy (buf + bufpos, t1, u + ulen - t1);
 
-  safe_free ((void **) &tocode1);
-  safe_free ((void **) &u);
+  FREE (&tocode1);
+  FREE (&u);
 
   buf[buflen] = '\0';
   
@@ -560,7 +560,7 @@ void _rfc2047_encode_string (char **pd, int encode_specials, int col)
                  Charset, charsets, &e, &elen,
                  encode_specials ? RFC822Specials : NULL);
 
-  safe_free ((void **) pd);
+  FREE (pd);
   *pd = e;
 }
 
@@ -612,8 +612,8 @@ static int rfc2047_decode_word (char *d, const char *s, size_t len)
          enc = ENCBASE64;
        else
        {
-         safe_free ((void **) &charset);
-         safe_free ((void **) &d0);
+         FREE (&charset);
+         FREE (&d0);
          return (-1);
        }
        break;
@@ -681,8 +681,8 @@ static int rfc2047_decode_word (char *d, const char *s, size_t len)
   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);
 }
 
@@ -771,7 +771,7 @@ void rfc2047_decode (char **pd)
   }
   *d = 0;
 
-  safe_free ((void **) pd);
+  FREE (pd);
   *pd = d0;
   mutt_str_adjust (pd);
 }
index 3c39658f00e6f0f5b12ea5efb2079886071a3b5f..188ea7d16242e051747237cdf6af77f9fdd3873d 100644 (file)
--- a/rfc2231.c
+++ b/rfc2231.c
@@ -150,7 +150,7 @@ void rfc2231_decode_parameters (PARAMETER **headp)
       
       p->attribute = NULL;
       p->value = NULL;
-      safe_free ((void **) &p);
+      FREE (&p);
 
       rfc2231_list_insert (&conthead, conttmp);
     }
@@ -177,9 +177,9 @@ static void rfc2231_free_parameter (struct rfc2231_parameter **p)
 {
   if (*p)
   {
-    safe_free ((void **) &(*p)->attribute);
-    safe_free ((void **) &(*p)->value);
-    safe_free ((void **) p);
+    FREE (&(*p)->attribute);
+    FREE (&(*p)->value);
+    FREE (p);
   }
 }
 
@@ -357,17 +357,17 @@ int rfc2231_encode_string (char **pd)
     *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;
 }
index 797f2d9462f447eeb604210353df5f429d0596c2..c7cc97b3dd591912dfb67de06e4dfc9f91a98f1c 100644 (file)
--- a/rfc822.c
+++ b/rfc822.c
@@ -509,7 +509,7 @@ void rfc822_qualify (ADDRESS *addr, const char *host)
     {
       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;
     }
 }
diff --git a/score.c b/score.c
index a9dc638ce62822a8c82f044b76ac630b7a3e0fdc..c460a2a2e1b8bb4da7238a84703462632fea2bfe 100644 (file)
--- a/score.c
+++ b/score.c
@@ -154,7 +154,7 @@ int mutt_parse_unscore (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err)
        last = tmp;
        tmp = tmp->next;
        mutt_pattern_free (&last->pat);
-       safe_free ((void **) &last);
+       FREE (&last);
       }
       Score = NULL;
     }
@@ -169,7 +169,7 @@ int mutt_parse_unscore (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err)
          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;
        }
diff --git a/send.c b/send.c
index 01e395441f89597617c02ff3b5b04aec8c60de28..6fff3462789a023806a83a52c9e7b7d8c0147915 100644 (file)
--- a/send.c
+++ b/send.c
@@ -1683,7 +1683,7 @@ cleanup:
     
     if(signas)
     {
-      safe_free((void **) &PgpSignAs);
+      FREE (&PgpSignAs);
       PgpSignAs = signas;
     }
   }
index c9a18481d15634d849eba2f3df868632c2396f61..1c628719dcf2a8dbd9cf909bfd0fce77c082179f 100644 (file)
--- a/sendlib.c
+++ b/sendlib.c
@@ -392,7 +392,7 @@ int mutt_write_mime_header (BODY *a, FILE *f)
       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;
 
@@ -438,7 +438,7 @@ int mutt_write_mime_header (BODY *a, FILE *f)
       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);
     }
   }
@@ -809,10 +809,10 @@ static size_t convert_file_to (FILE *file, const char *fromcode,
       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
@@ -878,7 +878,7 @@ static size_t convert_file_from_to (FILE *file,
        tcode[cn] = 0;
        break;
       }
-      safe_free ((void **) &fcode);
+      FREE (&fcode);
     }
   }
   else
@@ -895,9 +895,9 @@ static size_t convert_file_from_to (FILE *file,
 
   /* Free memory */
   for (i = 0; i < ncodes; i++)
-    safe_free ((void **) &tcode[i]);
+    FREE (&tcode[i]);
 
-  safe_free ((void **) tcode);
+  FREE (tcode);
   
   return ret;
 }
@@ -954,7 +954,7 @@ CONTENT *mutt_get_content_info (const char *fname, BODY *b)
        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;
     }
@@ -1132,7 +1132,7 @@ void mutt_message_to_7bit (BODY *a, FILE *fp)
   mutt_write_mime_body (a->parts, fpout);
   
  cleanup:
-  safe_free ((void **) &line);
+  FREE (&line);
 
   if (fpin && !fp)
     fclose (fpin);
@@ -1300,7 +1300,7 @@ void mutt_update_encoding (BODY *a)
   mutt_set_encoding (a, info);
   mutt_stamp_attachment(a);
 
-  safe_free ((void **) &a->content);
+  FREE (&a->content);
   a->content = info;
 
 }
@@ -1594,7 +1594,7 @@ static void write_references (LIST *r, FILE *f)
     fputs (ref[refcnt]->data, f);
   }
 
-  safe_free ((void **) &ref);
+  FREE (&ref);
 }
 
 /* Note: all RFC2047 encoding should be done outside of this routine, except
@@ -1757,7 +1757,7 @@ static void encode_headers (LIST *h)
 
     sprintf (h->data + i, ": %s", NONULL (tmp));  /* __SPRINTF_CHECKED__ */
     
-    safe_free ((void **) &tmp);
+    FREE (&tmp);
   }
 }
 
@@ -1898,7 +1898,7 @@ send_msg (const char *path, char **args, const char *msg, char **tempfile)
     else if (pid == -1)
     {
       unlink (msg);
-      safe_free ((void **) tempfile);
+      FREE (tempfile);
       _exit (S_ERR);
     }
 
@@ -1929,7 +1929,7 @@ send_msg (const char *path, char **args, const char *msg, char **tempfile)
       if (SendmailWait && st == (0xff & EX_OK))
       {
        unlink (*tempfile); /* no longer needed */
-       safe_free ((void **) tempfile);
+       FREE (tempfile);
       }
     }
     else
@@ -1939,7 +1939,7 @@ send_msg (const char *path, char **args, const char *msg, char **tempfile)
       if (SendmailWait > 0)
       {
        unlink (*tempfile);
-       safe_free ((void **) tempfile);
+       FREE (tempfile);
       }
     }
 
@@ -1951,7 +1951,7 @@ send_msg (const char *path, char **args, const char *msg, char **tempfile)
     {
       /* the parent is already dead */
       unlink (*tempfile);
-      safe_free ((void **) tempfile);
+      FREE (tempfile);
     }
 
     _exit (st);
diff --git a/smime.c b/smime.c
index 6819a63dabf19a928f7ece888c9a5c17d0636c1c..8ca5bb9b10aef6dec9aaa4ef753a7a9a78de08fc 100644 (file)
--- a/smime.c
+++ b/smime.c
@@ -514,7 +514,7 @@ char* smime_ask_for_key (char *prompt, char *mailbox, short public)
     else fname = NULL;
   
     mutt_menuDestroy (&menu);
-    safe_free ((void**)&Table);
+    FREE (&Table);
     set_option (OPTNEEDREDRAW);
   
     if (fname) return fname;
@@ -596,7 +596,7 @@ char *smime_get_field_from_db (char *mailbox, char *query, short public, short m
          {
            found = 0;
            ask = 0;
-           safe_free((void **) &key);
+           FREE (&key);
            key = NULL;
            break;
          }
@@ -662,7 +662,7 @@ char *smime_get_field_from_db (char *mailbox, char *query, short public, short m
       choice = mutt_yesorno (prompt, M_NO);
       if (choice == -1 || choice == M_NO)
       {
-       safe_free ((void **) &key);
+       FREE (&key);
        key = NULL;
       }
     }
@@ -676,7 +676,7 @@ char *smime_get_field_from_db (char *mailbox, char *query, short public, short m
        choice = mutt_yesorno (prompt, M_NO);
        if (choice != M_YES)
        {
-         safe_free ((void **) &key);
+         FREE (&key);
          key = NULL;
        }
 
@@ -729,7 +729,7 @@ void _smime_getkeys (char *mailbox)
     if (*SmimeKeyToUse && 
         !mutt_strcasecmp (k, SmimeKeyToUse + mutt_strlen (SmimeKeys)+1))
     {
-      safe_free ((void **) &k);
+      FREE (&k);
       return;
     }
     else smime_void_passphrase ();
@@ -743,7 +743,7 @@ void _smime_getkeys (char *mailbox)
     if (mutt_strcasecmp (k, SmimeDefaultKey))
       smime_void_passphrase ();
 
-    safe_free ((void **) &k);
+    FREE (&k);
     return;
   }
 
@@ -850,7 +850,7 @@ char *smime_findKeys (ADDRESS *to, ADDRESS *cc, ADDRESS *bcc)
     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;
@@ -1191,7 +1191,7 @@ void smime_invoke_import (char *infile, char *mailbox)
     mutt_wait_filter (thepid);
   
     mutt_unlink (certfile);
-    safe_free((void **)&certfile);
+    FREE (&certfile);
   }
 
   fflush (fpout);
@@ -1256,7 +1256,7 @@ int smime_verify_sender(HEADER *h)
       else
        retval = 0;
       mutt_unlink(certfile);
-      safe_free((void **)&certfile);
+      FREE (&certfile);
     }
   else 
        mutt_any_key_to_continue(_("no certfile"));
@@ -1682,7 +1682,7 @@ int smime_verify_one (BODY *sigbdy, STATE *s, const char *tempfile)
       if (linelen && !mutt_strcasecmp (line, "verification successful"))
        badsig = 0;
 
-      safe_free ((void **) &line);
+      FREE (&line);
     }
   }
   
@@ -1900,7 +1900,7 @@ static BODY *smime_handle_entity (BODY *m, STATE *s, FILE *outFile)
     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;
index af36fb3ec285928f40ab4654d0cdb0c7d07fb0be..d2a08408049db2d15cdb26193874b963ed630e88 100644 (file)
--- a/thread.c
+++ b/thread.c
@@ -135,7 +135,7 @@ static void calculate_visibility (CONTEXT *ctx, int *max_depth)
     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;
@@ -331,8 +331,8 @@ void mutt_draw_tree (CONTEXT *ctx)
     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
@@ -439,7 +439,7 @@ static THREAD *find_subject (CONTEXT *ctx, THREAD *cur)
 
     oldlist = subjects;
     subjects = subjects->next;
-    safe_free ((void **) &oldlist);
+    FREE (&oldlist);
   }
   return (last);
 }
@@ -696,7 +696,7 @@ THREAD *mutt_sort_subthreads (THREAD *thread, int init)
       else
       {
        Sort ^= SORT_REVERSE;
-       safe_free ((void **) &array);
+       FREE (&array);
        return (top);
       }
     }
diff --git a/url.c b/url.c
index f9fcaf6ace33ee9bc63e36a4c76926fc34db8e96..a1e51d2ece804da26acd7f17488d973b47841a3f 100644 (file)
--- a/url.c
+++ b/url.c
@@ -246,7 +246,7 @@ int url_parse_mailto (ENVELOPE *e, char **body, const char *src)
     }
   }
   
-  safe_free ((void **) &tmp);
+  FREE (&tmp);
   return 0;
 }