From 70fb4b7bbff869680b7eb0a7a7f198e4cb0ecdcb Mon Sep 17 00:00:00 2001 From: Bob Beck Date: Fri, 11 Dec 2015 22:34:35 +0000 Subject: fix nde structure initialization, noticed in netbsd pr 50381 by mmcc@ by ensuring the structure is zeroed when allocated from the pool ok mmcc@, stsp@ --- sys/tmpfs/tmpfs_mem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/tmpfs') diff --git a/sys/tmpfs/tmpfs_mem.c b/sys/tmpfs/tmpfs_mem.c index aaa321d9570..3471de191b3 100644 --- a/sys/tmpfs/tmpfs_mem.c +++ b/sys/tmpfs/tmpfs_mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tmpfs_mem.c,v 1.7 2015/03/14 03:38:52 jsg Exp $ */ +/* $OpenBSD: tmpfs_mem.c,v 1.8 2015/12/11 22:34:34 beck Exp $ */ /* $NetBSD: tmpfs_mem.c,v 1.4 2011/05/24 01:09:47 rmind Exp $ */ /* @@ -151,7 +151,7 @@ tmpfs_dirent_get(struct tmpfs_mount *mp) if (!tmpfs_mem_incr(mp, sizeof(struct tmpfs_dirent))) { return NULL; } - return pool_get(&tmpfs_dirent_pool, PR_WAITOK); + return pool_get(&tmpfs_dirent_pool, PR_ZERO|PR_WAITOK); } void -- cgit v1.2.3