summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorflorian <florian@openbsd.org>2017-11-03 16:23:20 +0000
committerflorian <florian@openbsd.org>2017-11-03 16:23:20 +0000
commit377fb1d3290e0e471201f10c16b78d2898eea6f9 (patch)
treed0d954c09c6ff6afffa72b54c460bd405b7f1265
parentFix regression, pointed out by Mark Johnston. (diff)
downloadwireguard-openbsd-377fb1d3290e0e471201f10c16b78d2898eea6f9.tar.xz
wireguard-openbsd-377fb1d3290e0e471201f10c16b78d2898eea6f9.zip
After inlining of raw_detach we know the sizes for free; pointed out
by & OK mpi, input & OK visa
-rw-r--r--sys/net/pfkeyv2.c4
-rw-r--r--sys/net/rtsock.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/net/pfkeyv2.c b/sys/net/pfkeyv2.c
index 1f9561e6ef4..496f95ccea9 100644
--- a/sys/net/pfkeyv2.c
+++ b/sys/net/pfkeyv2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfkeyv2.c,v 1.171 2017/11/03 13:01:20 florian Exp $ */
+/* $OpenBSD: pfkeyv2.c,v 1.172 2017/11/03 16:23:20 florian Exp $ */
/*
* @(#)COPYRIGHT 1.1 (NRL) 17 January 1995
@@ -284,7 +284,7 @@ pfkeyv2_detach(struct socket *so)
so->so_pcb = NULL;
sofree(so);
- free(&kp->rcb, M_PCB, 0);
+ free(kp, M_PCB, sizeof(struct keycb));
return (0);
}
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c
index dfd01c11cd8..ba253a30ab9 100644
--- a/sys/net/rtsock.c
+++ b/sys/net/rtsock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtsock.c,v 1.254 2017/11/03 14:10:33 florian Exp $ */
+/* $OpenBSD: rtsock.c,v 1.255 2017/11/03 16:23:20 florian Exp $ */
/* $NetBSD: rtsock.c,v 1.18 1996/03/29 00:32:10 cgd Exp $ */
/*
@@ -286,7 +286,7 @@ route_detach(struct socket *so)
so->so_pcb = NULL;
sofree(so);
- free(&rop->rcb, M_PCB, 0);
+ free(rop, M_PCB, sizeof(struct routecb));
return (0);
}