summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
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));
}
}
}