* patch #3966: Create a mh_xmalloc function to prevent mistakes when
[mmh] / sbr / seq_list.c
index 8a44069..ecc03bf 100644 (file)
@@ -11,6 +11,7 @@
  */
 
 #include <h/mh.h>
+#include <h/utils.h>
 
 /* allocate this much buffer space at a time */
 #define MAXBUFFER 1024
@@ -29,8 +30,7 @@ seq_list(struct msgs *mp, char *seqname)
     /* On first invocation, allocate initial buffer space */
     if (!buffer) {
        len = MAXBUFFER;
-       if (!(buffer = malloc ((size_t) len)))
-           adios (NULL, "unable to malloc storage in seq_list");
+       buffer = mh_xmalloc ((size_t) len);
     }
 
     /*