diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2011-09-23 07:27:10 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2011-09-23 07:27:10 +0000 |
commit | 7a921840a0ad3319626b94772a68794b0b515f3f (patch) | |
tree | 97057f26f7308fde499d367054d24c72ce076ad1 /sys/kern | |
parent | 2e439e3ddfc4d78491b2b3d3b7f437df8df9f522 (diff) |
ph = pool_get(&phpool, PR_NOWAIT) can return NULL, so dont unconditionally
write to ph.
ok blambert@ matthew@ deraadt@
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/subr_pool.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/subr_pool.c b/sys/kern/subr_pool.c index 101924a4ae6..b47065de5c0 100644 --- a/sys/kern/subr_pool.c +++ b/sys/kern/subr_pool.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_pool.c,v 1.108 2011/07/06 06:00:20 tedu Exp $ */ +/* $OpenBSD: subr_pool.c,v 1.109 2011/09/23 07:27:09 dlg Exp $ */ /* $NetBSD: subr_pool.c,v 1.61 2001/09/26 07:14:56 chs Exp $ */ /*- @@ -447,7 +447,7 @@ pool_alloc_item_header(struct pool *pp, caddr_t storage, int flags) else ph = pool_get(&phpool, (flags & ~(PR_WAITOK | PR_ZERO)) | PR_NOWAIT); - if (pool_debug) + if (pool_debug && ph != NULL) ph->ph_magic = PI_MAGIC; return (ph); } |