diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-08-25 07:01:25 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-08-25 07:01:25 +0000 |
commit | 8c0ea5645597594a377c0d901b229d50f5048c05 (patch) | |
tree | e90abbe6af0aa5e3a7f9bfcc16665b0f873b8349 | |
parent | 992476b7d9f0a9b6eab927083f66d8d752498360 (diff) |
obvious sizes for free()
-rw-r--r-- | sys/dev/vnd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c index a73042dce23..7c3e6f9798f 100644 --- a/sys/dev/vnd.c +++ b/sys/dev/vnd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vnd.c,v 1.155 2014/12/13 21:05:32 doug Exp $ */ +/* $OpenBSD: vnd.c,v 1.156 2015/08/25 07:01:24 deraadt Exp $ */ /* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */ /* @@ -578,7 +578,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, 0); + free(lp, M_TEMP, sizeof(*lp)); return (0); case DIOCGPDINFO: @@ -650,7 +650,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, 0); + free(buf, M_TEMP, DEV_BSIZE); return (error); } |