summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2015-11-25 04:49:11 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2015-11-25 04:49:11 +0000
commit76c305d927ae75f5822574ce71845532118aa800 (patch)
tree34a5e4f5b9d1662eeee582c39e146b5c7c8b47ea /sys/dev
parentf34c90ee8215bfbf1078f2ff522579ba6265eed6 (diff)
add size to free
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/isa/fd.c6
-rw-r--r--sys/dev/isa/spkr.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/isa/fd.c b/sys/dev/isa/fd.c
index 311fcf32e93..b2b378b2846 100644
--- a/sys/dev/isa/fd.c
+++ b/sys/dev/isa/fd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fd.c,v 1.102 2015/03/14 03:38:47 jsg Exp $ */
+/* $OpenBSD: fd.c,v 1.103 2015/11/25 04:49:10 tedu Exp $ */
/* $NetBSD: fd.c,v 1.90 1996/05/12 23:12:03 mycroft Exp $ */
/*-
@@ -1012,7 +1012,7 @@ fdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p)
lp = malloc(sizeof(*lp), M_TEMP, M_WAITOK);
fdgetdisklabel(dev, fd, lp, 0);
bcopy(lp, fd->sc_dk.dk_label, sizeof(*lp));
- free(lp, M_TEMP, 0);
+ free(lp, M_TEMP, sizeof(*lp));
return 0;
case DIOCGPDINFO:
@@ -1111,6 +1111,6 @@ fdformat(dev_t dev, struct fd_formb *finfo, struct proc *p)
/* ...and wait for it to complete */
rv = biowait(bp);
- free(bp, M_TEMP, 0);
+ free(bp, M_TEMP, sizeof(*bp));
return (rv);
}
diff --git a/sys/dev/isa/spkr.c b/sys/dev/isa/spkr.c
index 435a048e655..d8a54c45425 100644
--- a/sys/dev/isa/spkr.c
+++ b/sys/dev/isa/spkr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spkr.c,v 1.19 2015/02/10 22:50:12 miod Exp $ */
+/* $OpenBSD: spkr.c,v 1.20 2015/11/25 04:49:10 tedu Exp $ */
/* $NetBSD: spkr.c,v 1.1 1998/04/15 20:26:18 drochner Exp $ */
/*
@@ -451,7 +451,7 @@ spkrclose(dev_t dev, int flags, int mode, struct proc *p)
return (ENXIO);
else {
tone(0, 0);
- free(spkr_inbuf, M_DEVBUF, 0);
+ free(spkr_inbuf, M_DEVBUF, DEV_BSIZE);
spkr_active = 0;
}
return (0);