summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-08-26 22:36:18 +0000
committerderaadt <deraadt@openbsd.org>2015-08-26 22:36:18 +0000
commit1d3143244a89075afbd6f11130c81ef401fa87d9 (patch)
treed5ecd0792a684746bc2e4e88d4559e907e020400
parenttwo simple sizes to free() (diff)
downloadwireguard-openbsd-1d3143244a89075afbd6f11130c81ef401fa87d9.tar.xz
wireguard-openbsd-1d3143244a89075afbd6f11130c81ef401fa87d9.zip
Simple size for free(). These are a pleasure to convert when the
allocation is clearly spelled out as ptr = malloc(sizeof(*ptr), ...)
-rw-r--r--sys/dev/vnd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c
index 7c3e6f9798f..7a294d5bc16 100644
--- a/sys/dev/vnd.c
+++ b/sys/dev/vnd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vnd.c,v 1.156 2015/08/25 07:01:24 deraadt Exp $ */
+/* $OpenBSD: vnd.c,v 1.157 2015/08/26 22:36:18 deraadt Exp $ */
/* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */
/*
@@ -536,7 +536,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, 0);
+ free(sc->sc_keyctx, M_DEVBUF, sizeof(*sc->sc_keyctx));
}
/* Detach the disk. */