* patch #3966: Create a mh_xmalloc function to prevent mistakes when
[mmh] / uip / mhn.c
index 55f06c4..27ee05b 100644 (file)
--- a/uip/mhn.c
+++ b/uip/mhn.c
@@ -242,8 +242,7 @@ main (int argc, char **argv)
      */
     nummsgs = 0;
     maxmsgs = MAXMSGS;
      */
     nummsgs = 0;
     maxmsgs = MAXMSGS;
-    if (!(msgs = (char **) malloc ((size_t) (maxmsgs * sizeof(*msgs)))))
-       adios (NULL, "unable to allocate storage");
+    msgs = (char **) mh_xmalloc ((size_t) (maxmsgs * sizeof(*msgs)));
 
     /*
      * Parse arguments
 
     /*
      * Parse arguments