X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fsendsbr.c;h=f793b1c83feea36ffbff4b150cadca702eba4989;hp=fae91b3debd3c75d688563b4c08cff0e4b55c690;hb=389877bae1fe1a9f7259b8979f6a930744d90fab;hpb=e2c71f66b925a33cceb1ea4b75a62a05333d124a diff --git a/uip/sendsbr.c b/uip/sendsbr.c index fae91b3..f793b1c 100644 --- a/uip/sendsbr.c +++ b/uip/sendsbr.c @@ -15,6 +15,7 @@ #include #include #include +#include #ifdef TIME_WITH_SYS_TIME # include @@ -208,8 +209,7 @@ attach(char *attachment_header_field_name, char *draft_file_name) * This buffer might need to be quite large, so we grow it as needed. */ - if ((field = (char *)malloc(field_size = 256)) == (char *)0) - adios(NULL, "can't allocate field buffer."); + field = (char *)mh_xmalloc(field_size = 256); /* * Scan the draft file for a header field name that matches the -attach @@ -360,8 +360,7 @@ get_line(void) } if (++n >= field_size - 1) { - if ((field = (char *)realloc((void *)field, field_size += 256)) == (char *)0) - adios(NULL, "can't grow field buffer."); + field = (char *)mh_xrealloc((void *)field, field_size += 256); p = field + n - 1; }