From 322ae93a5e0b78b65831f9fd87fd456eb84d21a1 Mon Sep 17 00:00:00 2001 From: Matt Kraai Date: Wed, 13 Sep 2000 02:46:14 +0000 Subject: Fix calls to {m,c,re}alloc so that they use x{m,c,re}alloc instead of segfaulting or handling errors the same way themselves. --- loadfont.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'loadfont.c') diff --git a/loadfont.c b/loadfont.c index 927c2bad4..e93ca3186 100644 --- a/loadfont.c +++ b/loadfont.c @@ -102,12 +102,8 @@ do_loadtable(int fd, unsigned char *inbuf, int tailsz, int fontsize) u_short unicode; maxct = tailsz; /* more than enough */ - up = (struct unipair *) malloc(maxct * sizeof(struct unipair)); + up = (struct unipair *) xmalloc(maxct * sizeof(struct unipair)); - if (!up) { - errorMsg("Out of memory?\n"); - exit(1); - } for (glyph = 0; glyph < fontsize; glyph++) { while (tailsz >= 2) { unicode = (((u_short) inbuf[1]) << 8) + inbuf[0]; -- cgit v1.2.3