X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=rfc2231.c;h=6c9d4b5200084fc44896d7dd56c4ad9d87848c7f;hp=f7caea15a45166f9e9cb01eb033bbf69238c9266;hb=ba5e3af4ea19e1d20c80941c077039871ec84258;hpb=a8477ebaa09990b3688164cbe5cf661c4189541d diff --git a/rfc2231.c b/rfc2231.c index f7caea1..6c9d4b5 100644 --- a/rfc2231.c +++ b/rfc2231.c @@ -145,7 +145,7 @@ void rfc2231_decode_parameters (PARAMETER ** headp) p->attribute = NULL; p->value = NULL; - FREE (&p); + mem_free (&p); rfc2231_list_insert (&conthead, conttmp); } @@ -164,15 +164,15 @@ void rfc2231_decode_parameters (PARAMETER ** headp) static struct rfc2231_parameter *rfc2231_new_parameter (void) { - return safe_calloc (sizeof (struct rfc2231_parameter), 1); + return mem_calloc (sizeof (struct rfc2231_parameter), 1); } static void rfc2231_free_parameter (struct rfc2231_parameter **p) { if (*p) { - FREE (&(*p)->attribute); - FREE (&(*p)->value); - FREE (p); + mem_free (&(*p)->attribute); + mem_free (&(*p)->value); + mem_free (p); } } @@ -271,7 +271,7 @@ static void rfc2231_join_continuations (PARAMETER ** head, vl = str_len (par->value); - safe_realloc (&value, l + vl + 1); + mem_realloc (&value, l + vl + 1); strcpy (value + l, par->value); /* __STRCPY_CHECKED__ */ l += vl; @@ -330,7 +330,7 @@ int rfc2231_encode_string (char **pd) ++ext; if (encode) { - e = safe_malloc (dlen + 2 * ext + str_len (charset) + 3); + e = mem_malloc (dlen + 2 * ext + str_len (charset) + 3); sprintf (e, "%s''", charset); /* __SPRINTF_CHECKED__ */ t = e + str_len (e); for (s = d, slen = dlen; slen; s++, slen--) @@ -344,16 +344,16 @@ int rfc2231_encode_string (char **pd) *t = '\0'; if (d != *pd) - FREE (&d); - FREE (pd); + mem_free (&d); + mem_free (pd); *pd = e; } else if (d != *pd) { - FREE (pd); + mem_free (pd); *pd = d; } - FREE (&charset); + mem_free (&charset); return encode; }