summaryrefslogtreecommitdiff
path: root/sys/dev/vnd.c
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2014-07-12 18:48:54 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2014-07-12 18:48:54 +0000
commit9355adab6702f4798111e38a2e7e7be541270937 (patch)
tree1fda49353b276c780d60c7609e331839f2c13505 /sys/dev/vnd.c
parent48b6cac396e42c57b5037f5a67d6cd7afb1733d6 (diff)
add a size argument to free. will be used soon, but for now default to 0.
after discussions with beck deraadt kettenis.
Diffstat (limited to 'sys/dev/vnd.c')
-rw-r--r--sys/dev/vnd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c
index afc44763371..c59acc44d1c 100644
--- a/sys/dev/vnd.c
+++ b/sys/dev/vnd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vnd.c,v 1.152 2013/11/12 14:11:07 krw Exp $ */
+/* $OpenBSD: vnd.c,v 1.153 2014/07/12 18:48:51 tedu Exp $ */
/* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */
/*
@@ -537,7 +537,7 @@ vndioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p)
/* Free crypto key */
if (sc->sc_keyctx) {
explicit_bzero(sc->sc_keyctx, sizeof(*sc->sc_keyctx));
- free(sc->sc_keyctx, M_DEVBUF);
+ free(sc->sc_keyctx, M_DEVBUF, 0);
}
/* Detach the disk. */
@@ -579,7 +579,7 @@ vndioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p)
lp = malloc(sizeof(*lp), M_TEMP, M_WAITOK);
vndgetdisklabel(dev, sc, lp, 0);
*(sc->sc_dk.dk_label) = *lp;
- free(lp, M_TEMP);
+ free(lp, M_TEMP, 0);
return (0);
case DIOCGPDINFO:
@@ -651,7 +651,7 @@ vndsetcred(struct vnd_softc *sc, struct ucred *cred)
error = vn_rdwr(UIO_READ, sc->sc_vp, buf, size, 0, UIO_SYSSPACE, 0,
sc->sc_cred, NULL, curproc);
- free(buf, M_TEMP);
+ free(buf, M_TEMP, 0);
return (error);
}