diff options
| author | 2007-01-10 18:17:52 +0000 | |
|---|---|---|
| committer | 2007-01-10 18:17:52 +0000 | |
| commit | 7a0a28154a40752182092c50e60616f64dcbbcd5 (patch) | |
| tree | 88861cc0f13838369f6e795afdb0c5de83c09937 /usr.sbin/bind/lib/isc/taskpool.c | |
| parent | change firmware byte order to be same on all architectures (diff) | |
| download | wireguard-openbsd-7a0a28154a40752182092c50e60616f64dcbbcd5.tar.xz wireguard-openbsd-7a0a28154a40752182092c50e60616f64dcbbcd5.zip | |
ISC BIND release 9.3.3
Diffstat (limited to 'usr.sbin/bind/lib/isc/taskpool.c')
| -rw-r--r-- | usr.sbin/bind/lib/isc/taskpool.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.sbin/bind/lib/isc/taskpool.c b/usr.sbin/bind/lib/isc/taskpool.c index 2dbcc445672..7b06e70de9f 100644 --- a/usr.sbin/bind/lib/isc/taskpool.c +++ b/usr.sbin/bind/lib/isc/taskpool.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2001 Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $ISC: taskpool.c,v 1.10.12.3 2004/03/08 09:04:50 marka Exp $ */ +/* $ISC: taskpool.c,v 1.10.12.5 2006/01/04 23:50:21 marka Exp $ */ #include <config.h> @@ -52,6 +52,10 @@ isc_taskpool_create(isc_taskmgr_t *tmgr, isc_mem_t *mctx, pool->mctx = mctx; pool->ntasks = ntasks; pool->tasks = isc_mem_get(mctx, ntasks * sizeof(isc_task_t *)); + if (pool->tasks == NULL) { + isc_mem_put(mctx, pool, sizeof(*pool)); + return (ISC_R_NOMEMORY); + } for (i = 0; i < ntasks; i++) pool->tasks[i] = NULL; for (i = 0; i < ntasks; i++) { |
