Wrap malloc() calls with an INTOFF/INTON pair. Fixes PR 8414.

This commit is contained in:
mycroft 2000-10-21 04:37:17 +00:00
parent f5abf3cd7a
commit 8f48358936

View File

@ -1,4 +1,4 @@
/* $NetBSD: memalloc.c,v 1.21 1998/01/31 12:36:17 christos Exp $ */
/* $NetBSD: memalloc.c,v 1.22 2000/10/21 04:37:17 mycroft Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)memalloc.c 8.3 (Berkeley) 5/4/95";
#else
__RCSID("$NetBSD: memalloc.c,v 1.21 1998/01/31 12:36:17 christos Exp $");
__RCSID("$NetBSD: memalloc.c,v 1.22 2000/10/21 04:37:17 mycroft Exp $");
#endif
#endif /* not lint */
@ -65,7 +65,10 @@ ckmalloc(nbytes)
{
pointer p;
if ((p = malloc(nbytes)) == NULL)
INTOFF;
p = malloc(nbytes);
INTON;
if (p == NULL)
error("Out of space");
return p;
}