X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fmhlsbr.c;h=af3fa554df5ba3fdada202ef1ea70fbd7163240d;hp=c310e2a075da5cef080664040361355f402caf87;hb=81a21a9a97d8633f6d6231e31fdb6e328d0d3ff2;hpb=582d618b69077087961c367bd1631495906c92a8 diff --git a/uip/mhlsbr.c b/uip/mhlsbr.c index c310e2a..af3fa55 100644 --- a/uip/mhlsbr.c +++ b/uip/mhlsbr.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -955,8 +956,7 @@ mhlfile (FILE *fp, char *mname, int ofilen, int ofilec) continue; } if (dobody && !strcasecmp (c1->c_name, "body")) { - if ((holder.c_text = malloc (sizeof(buf))) == NULL) - adios (NULL, "unable to allocate buffer memory"); + holder.c_text = mh_xmalloc (sizeof(buf)); strncpy (holder.c_text, buf, sizeof(buf)); while (state == BODY) { putcomp (c1, &holder, BODYCOMP); @@ -1650,8 +1650,7 @@ doface (struct mcomp *c1) cp = dp, len = j; } else { - if ((cp = malloc ((unsigned) i)) == NULL) - adios (NULL, "unable to allocate face storage"); + cp = mh_xmalloc ((unsigned) i); memcpy(cp, buffer, i); len = i; }