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/nwfs/nwfs_vfsops.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/nwfs/nwfs_vfsops.c')
-rw-r--r-- | sys/nwfs/nwfs_vfsops.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/nwfs/nwfs_vfsops.c b/sys/nwfs/nwfs_vfsops.c index 34a88c6..c0f0844 100644 --- a/sys/nwfs/nwfs_vfsops.c +++ b/sys/nwfs/nwfs_vfsops.c @@ -125,7 +125,6 @@ nwfs_initnls(struct nwmount *nmp) { return 0; } MALLOC(pe, char *, 256 * 4, M_NWFSDATA, M_WAITOK); - if (pe == NULL) return ENOMEM; pc = pe; do { COPY_TABLE(nmp->m.nls.to_lower, ncp_defnls.to_lower); @@ -183,13 +182,12 @@ static int nwfs_mount(struct mount *mp, char *path, caddr_t data, ncp_conn_unlock(conn,p); /* we keep the ref */ mp->mnt_stat.f_iosize = conn->buffer_size; /* We must malloc our own mount info */ - MALLOC(nmp,struct nwmount *,sizeof(struct nwmount),M_NWFSDATA,M_USE_RESERVE); + MALLOC(nmp,struct nwmount *,sizeof(struct nwmount),M_NWFSDATA,M_USE_RESERVE | M_ZERO); if (nmp == NULL) { nwfs_printf("could not alloc nwmount\n"); error = ENOMEM; goto bad; } - bzero(nmp,sizeof(*nmp)); mp->mnt_data = (qaddr_t)nmp; nmp->connh = handle; nmp->n_root = NULL; |