summaryrefslogtreecommitdiff
path: root/sys/nfs/nfs_vnops.c
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2014-11-14 23:11:36 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2014-11-14 23:11:36 +0000
commit9e01215dc07220f6ac9a787d6fbd04be08c29352 (patch)
treeb7cab72a7acd00fdf5179b5e267318a33fd122d6 /sys/nfs/nfs_vnops.c
parent10a31271800d64de11acb3a45218552bd5013243 (diff)
simplest free(size)
Diffstat (limited to 'sys/nfs/nfs_vnops.c')
-rw-r--r--sys/nfs/nfs_vnops.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c
index c7eed8b8d70..cc3e9bead58 100644
--- a/sys/nfs/nfs_vnops.c
+++ b/sys/nfs/nfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_vnops.c,v 1.153 2014/09/14 14:17:26 jsg Exp $ */
+/* $OpenBSD: nfs_vnops.c,v 1.154 2014/11/14 23:11:35 tedu Exp $ */
/* $NetBSD: nfs_vnops.c,v 1.62.4.1 1996/07/08 20:26:52 jtc Exp $ */
/*
@@ -2039,7 +2039,7 @@ nfs_readdir(void *v)
}
} while (!error && !done && !eof && cnt--);
- free(data, M_TEMP, 0);
+ free(data, M_TEMP, NFS_DIRBLKSIZ);
data = NULL;
uio->uio_offset = newoff;
@@ -2216,7 +2216,7 @@ nfs_readdirrpc(struct vnode *vp, struct uio *uiop, struct ucred *cred,
more_dirs = fxdr_unsigned(int, *tl);
}
/*
- * If at end of rpc data, get the eof boolean
+ * If at end of rpc NFS_DIRBLKSIZ, get the eof boolean
*/
if (!more_dirs) {
nfsm_dissect(tl, u_int32_t *, NFSX_UNSIGNED);
@@ -2498,7 +2498,7 @@ nfs_sillyrename(struct vnode *dvp, struct vnode *vp, struct componentname *cnp)
cache_purge(dvp);
np = VTONFS(vp);
- sp = malloc(sizeof(struct sillyrename), M_NFSREQ, M_WAITOK);
+ sp = malloc(sizeof(*sp), M_NFSREQ, M_WAITOK);
sp->s_cred = crdup(cnp->cn_cred);
sp->s_dvp = dvp;
vref(dvp);
@@ -2537,7 +2537,7 @@ nfs_sillyrename(struct vnode *dvp, struct vnode *vp, struct componentname *cnp)
bad:
vrele(sp->s_dvp);
crfree(sp->s_cred);
- free(sp, M_NFSREQ, 0);
+ free(sp, M_NFSREQ, sizeof(*sp));
return (error);
}