diff options
author | dwmalone <dwmalone@FreeBSD.org> | 2000-10-29 16:14:28 +0000 |
---|---|---|
committer | dwmalone <dwmalone@FreeBSD.org> | 2000-10-29 16:14:28 +0000 |
commit | e401b83c31c135957d1a7be0c6e3d9a397af04f4 (patch) | |
tree | 043a242b4f57610c1e64febb748e01644ecd10ef /sys/fs/nwfs/nwfs_node.c | |
parent | 8cfaee4a94cc83819c9faa826778851c2824a532 (diff) | |
download | FreeBSD-src-e401b83c31c135957d1a7be0c6e3d9a397af04f4.zip FreeBSD-src-e401b83c31c135957d1a7be0c6e3d9a397af04f4.tar.gz |
Make malloc use M_ZERO in some more locations.
Don't check for a null pointer if malloc called with M_WAITOK.
Submitted by: josh@zipperup.org
Submitted by: Robert Drehmel <robd@gmx.net>
Approved by: bp
Diffstat (limited to 'sys/fs/nwfs/nwfs_node.c')
-rw-r--r-- | sys/fs/nwfs/nwfs_node.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/fs/nwfs/nwfs_node.c b/sys/fs/nwfs/nwfs_node.c index 03d3e86..bddc0d0 100644 --- a/sys/fs/nwfs/nwfs_node.c +++ b/sys/fs/nwfs/nwfs_node.c @@ -163,14 +163,13 @@ rescan: * might cause a bogus v_data pointer to get dereferenced * elsewhere if MALLOC should block. */ - MALLOC(np, struct nwnode *, sizeof *np, M_NWNODE, M_WAITOK); + MALLOC(np, struct nwnode *, sizeof *np, M_NWNODE, M_WAITOK | M_ZERO); error = getnewvnode(VT_NWFS, mp, nwfs_vnodeop_p, &vp); if (error) { *vpp = NULL; FREE(np, M_NWNODE); return (error); } - bzero(np, sizeof(*np)); vp->v_data = np; np->n_vnode = vp; np->n_mount = nmp; |