]> diplodocus.org Git - nmh/blobdiff - uip/sortm.c
Added context_find_prefix().
[nmh] / uip / sortm.c
index 3df188592fcb86026b6f7a5c821d44fecd59483d..0b8e18534188e3a02932cfefc8cec1b3f2471307 100644 (file)
@@ -253,7 +253,7 @@ main (int argc, char **argv)
         * the collection of messages with the same subj
         * given a message number.
         */
-       il = (struct smsg ***) calloc (mp->hghsel+1, sizeof(*il));
+       il = (struct smsg ***) mh_xcalloc (mp->hghsel+1, sizeof(*il));
        if (! il)
            adios (NULL, "couldn't allocate msg list");
        for (i = 0; i < nmsgs; i++)
@@ -287,6 +287,7 @@ main (int argc, char **argv)
            }
        }
        *fp = 0;
+       free (il);
        free (slist);
        free (dlist);
        dlist = flist;
@@ -317,7 +318,7 @@ read_hdrs (struct msgs *mp, char *datesw)
     twscopy (&tb, dlocaltimenow ());
 
     smsgs = (struct smsg *)
-       calloc ((size_t) (mp->hghsel - mp->lowsel + 2),
+       mh_xcalloc ((size_t) (mp->hghsel - mp->lowsel + 2),
            sizeof(*smsgs));
     if (smsgs == NULL)
        adios (NULL, "unable to allocate sort storage");