summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-08-26 22:29:40 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-08-26 22:29:40 +0000
commitdaeaa66129e988e1968f865c9802eace5189b738 (patch)
tree4cca1bc04915e23bff0000357e697d43a5640bc8 /sys/dev
parenta85266a288760c134ef7016b01be0cd09d799d8d (diff)
trivial size to free()
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ata/wd.c4
-rw-r--r--sys/dev/bio.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/ata/wd.c b/sys/dev/ata/wd.c
index ce864209ea3..634cb433f81 100644
--- a/sys/dev/ata/wd.c
+++ b/sys/dev/ata/wd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wd.c,v 1.118 2015/08/17 15:36:29 krw Exp $ */
+/* $OpenBSD: wd.c,v 1.119 2015/08/26 22:29:39 deraadt Exp $ */
/* $NetBSD: wd.c,v 1.193 1999/02/28 17:15:27 explorer Exp $ */
/*
@@ -781,7 +781,7 @@ wdioctl(dev_t dev, u_long xfer, caddr_t addr, int flag, struct proc *p)
lp = malloc(sizeof(*lp), M_TEMP, M_WAITOK);
wdgetdisklabel(dev, wd, lp, 0);
bcopy(lp, wd->sc_dk.dk_label, sizeof(*lp));
- free(lp, M_TEMP, 0);
+ free(lp, M_TEMP, sizeof(*lp));
goto exit;
case DIOCGPDINFO:
diff --git a/sys/dev/bio.c b/sys/dev/bio.c
index c0bb3aaf715..f806bd34394 100644
--- a/sys/dev/bio.c
+++ b/sys/dev/bio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bio.c,v 1.16 2015/05/29 00:33:37 uebayasi Exp $ */
+/* $OpenBSD: bio.c,v 1.17 2015/08/26 22:28:57 deraadt Exp $ */
/*
* Copyright (c) 2002 Niklas Hallqvist. All rights reserved.
@@ -135,7 +135,7 @@ bio_unregister(struct device *dev)
if (dev == bm->bm_dev) {
LIST_REMOVE(bm, bm_link);
- free(bm, M_DEVBUF, 0);
+ free(bm, M_DEVBUF, sizeof(*bm));
}
}
}