summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/kern/subr_pool.c4
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);
}