From: deraadt Date: Tue, 30 May 2017 16:16:47 +0000 (+0000) Subject: sizes for free() X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=c21dfa9e48c7e4049915f4839d7ac332baaca24f;p=openbsd sizes for free() --- diff --git a/sys/net/if_mpe.c b/sys/net/if_mpe.c index e1c2db01829..ead204082dc 100644 --- a/sys/net/if_mpe.c +++ b/sys/net/if_mpe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mpe.c,v 1.60 2017/05/30 07:50:37 mpi Exp $ */ +/* $OpenBSD: if_mpe.c,v 1.61 2017/05/30 16:16:47 deraadt Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard @@ -127,7 +127,7 @@ mpe_clone_destroy(struct ifnet *ifp) } if_detach(ifp); - free(mpeif, M_DEVBUF, 0); + free(mpeif, M_DEVBUF, sizeof *mpeif); return (0); } diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c index 48981038698..b672107791a 100644 --- a/sys/net/if_tun.c +++ b/sys/net/if_tun.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tun.c,v 1.175 2017/05/30 07:50:37 mpi Exp $ */ +/* $OpenBSD: if_tun.c,v 1.176 2017/05/30 16:16:47 deraadt Exp $ */ /* $NetBSD: if_tun.c,v 1.24 1996/05/07 02:40:48 thorpej Exp $ */ /* @@ -271,7 +271,7 @@ tun_clone_destroy(struct ifnet *ifp) if_detach(ifp); - free(tp, M_DEVBUF, 0); + free(tp, M_DEVBUF, sizeof *tp); return (0); }