X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fmhshow.c;h=dc5c2020b4d2dac22ed214488e69f1523dba3012;hp=bb03939cce43e199722234c2b963e4c6909f98f6;hb=d4c34b4439a9dbd89664de460ed37ecddc260fb1;hpb=7a13a5266a14f1c6a13752db9292cd40c1211fba diff --git a/uip/mhshow.c b/uip/mhshow.c index bb03939..dc5c202 100644 --- a/uip/mhshow.c +++ b/uip/mhshow.c @@ -174,7 +174,7 @@ main(int argc, char **argv) adios(EX_USAGE, NULL, "missing argument to %s", argp[-2]); if (formsw) - free(formsw); + mh_free0(&formsw); formsw = getcpy(etcpath(cp)); continue; @@ -249,7 +249,7 @@ main(int argc, char **argv) ** check if message is coming from file */ if (file) { - cts = (CT *) mh_xcalloc((size_t) 2, sizeof(*cts)); + cts = mh_xcalloc(2, sizeof(*cts)); ctp = cts; if ((ct = parse_mime(file))) @@ -303,8 +303,7 @@ main(int argc, char **argv) seq_setprev(mp); /* set the Previous-Sequence */ seq_setunseen(mp, 0); /* unset unseen seqs for shown msgs */ - cts = (CT *) mh_xcalloc((size_t) (mp->numsel + 1), - sizeof(*cts)); + cts = mh_xcalloc(mp->numsel + 1, sizeof(*cts)); ctp = cts; /* @@ -360,8 +359,7 @@ main(int argc, char **argv) for (ctp = cts; *ctp; ctp++) free_content(*ctp); - free((char *) cts); - cts = NULL; + mh_free0(&cts); /* If reading from a folder, do some updating */ if (mp) {