$NetBSD: patch-bn,v 1.1 2008/08/31 06:52:29 dholland Exp $ --- server/cx.c.orig 1997-10-03 16:45:33.000000000 -0400 +++ server/cx.c 2008-08-31 01:27:59.000000000 -0400 @@ -30,6 +30,7 @@ * server i/o dialog. * * * ************************************************************************/ +#include #include "xmx.h" #include "df.h" #include "cx.h" @@ -113,8 +114,12 @@ new_cx cxp = cxfree; cxfree = cxfree->next; } - else if (MALLOC(cxp, cx_t *, sizeof(cx_t))) - return (cx_t *)err(0, "malloc returned zero"); + else if (MALLOC(cxp, cx_t *, sizeof(cx_t))) { + /* this err returns its first argument */ + /*return (cx_t *)err(0, "malloc returned zero");*/ + err(0, "malloc returned zero"); + return NULL; + } return cxp; }