summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2003-11-19 02:52:14 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2003-11-19 02:52:14 +0000
commit04b32d4f433fed76b21df2aaae0e203b65afcb7a (patch)
tree555bd09faeea00ff2ec3d61cfea58960b7541cb9 /sys
parentdca5e0af23f5e2f89e4057abf36c3609ec59dd37 (diff)
MALLOC is not meant for variable size allocations
Diffstat (limited to 'sys')
-rw-r--r--sys/ufs/ffs/ffs_inode.c4
-rw-r--r--sys/ufs/ffs/ffs_softdep.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/ufs/ffs/ffs_inode.c b/sys/ufs/ffs/ffs_inode.c
index f71b2dc7fe1..bd0c993e9c2 100644
--- a/sys/ufs/ffs/ffs_inode.c
+++ b/sys/ufs/ffs/ffs_inode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_inode.c,v 1.34 2003/08/25 23:26:55 tedu Exp $ */
+/* $OpenBSD: ffs_inode.c,v 1.35 2003/11/19 02:52:13 tedu Exp $ */
/* $NetBSD: ffs_inode.c,v 1.10 1996/05/11 18:27:19 mycroft Exp $ */
/*
@@ -482,7 +482,7 @@ ffs_indirtrunc(ip, lbn, dbn, lastbn, level, countp)
bap = (daddr_t *)bp->b_data;
if (lastbn != -1) {
- MALLOC(copy, daddr_t *, fs->fs_bsize, M_TEMP, M_WAITOK);
+ copy = malloc(fs->fs_bsize, M_TEMP, M_WAITOK);
bcopy((caddr_t)bap, (caddr_t)copy, (u_int)fs->fs_bsize);
bzero((caddr_t)&bap[last + 1],
(u_int)(NINDIR(fs) - (last + 1)) * sizeof (daddr_t));
diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c
index 0d750619478..2a23f42b493 100644
--- a/sys/ufs/ffs/ffs_softdep.c
+++ b/sys/ufs/ffs/ffs_softdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_softdep.c,v 1.46 2003/08/25 23:26:55 tedu Exp $ */
+/* $OpenBSD: ffs_softdep.c,v 1.47 2003/11/19 02:52:13 tedu Exp $ */
/*
* Copyright 1998, 2000 Marshall Kirk McKusick. All Rights Reserved.
*
@@ -3110,7 +3110,7 @@ softdep_disk_io_initiation(bp)
/*
* Replace up-to-date version with safe version.
*/
- MALLOC(indirdep->ir_saveddata, caddr_t, bp->b_bcount,
+ indirdep->ir_saveddata = malloc(bp->b_bcount,
M_INDIRDEP, M_WAITOK);
ACQUIRE_LOCK(&lk);
indirdep->ir_state &= ~ATTACHED;