diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-08-28 00:03:55 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-08-28 00:03:55 +0000 |
commit | 5ad0e8c0aeab06cc8ce3a15ee37adfe7cc17c615 (patch) | |
tree | 4c6488a821b9d519bda84a6732552a136bbdbd76 /sys/nfs | |
parent | 345b5260c0d266903c3e0fe179df2a1d3c10a5dc (diff) |
fairly simple sizes for free(); ok tedu
Diffstat (limited to 'sys/nfs')
-rw-r--r-- | sys/nfs/nfs_aiod.c | 4 | ||||
-rw-r--r-- | sys/nfs/nfs_srvcache.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/nfs/nfs_aiod.c b/sys/nfs/nfs_aiod.c index 0f002b666e9..ddb595800fc 100644 --- a/sys/nfs/nfs_aiod.c +++ b/sys/nfs/nfs_aiod.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_aiod.c,v 1.6 2014/07/12 18:43:52 tedu Exp $ */ +/* $OpenBSD: nfs_aiod.c,v 1.7 2015/08/28 00:03:54 deraadt Exp $ */ /* * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. @@ -147,7 +147,7 @@ loop: /* Loop around until SIGKILL */ goto loop; out1: - free(aiod, M_TEMP, 0); + free(aiod, M_TEMP, sizeof(*aiod)); nfs_numaiods--; KASSERT(nfs_numaiods >= 0); /* Rejust the limit of bufs to queue. See comment above. */ diff --git a/sys/nfs/nfs_srvcache.c b/sys/nfs/nfs_srvcache.c index 6e4c2d21ef0..ee15fc49022 100644 --- a/sys/nfs/nfs_srvcache.c +++ b/sys/nfs/nfs_srvcache.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_srvcache.c,v 1.27 2015/03/14 03:38:52 jsg Exp $ */ +/* $OpenBSD: nfs_srvcache.c,v 1.28 2015/08/28 00:03:54 deraadt Exp $ */ /* $NetBSD: nfs_srvcache.c,v 1.12 1996/02/18 11:53:49 fvdl Exp $ */ /* @@ -266,7 +266,7 @@ nfsrv_cleancache(void) LIST_REMOVE(rp, rc_hash); TAILQ_REMOVE(&nfsrvlruhead, rp, rc_lru); nfsrv_cleanentry(rp); - free(rp, M_NFSD, 0); + free(rp, M_NFSD, sizeof(*rp)); } numnfsrvcache = 0; } |