From eeacc5de2f7d30185a0e11f97de694050c2f81af Mon Sep 17 00:00:00 2001 From: deraadt Date: Wed, 7 Oct 2015 14:52:45 +0000 Subject: [PATCH] easy size for free(); ok mpi --- sys/netinet/ip_output.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index 4806418f0f6..24ecc1b4bdb 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_output.c,v 1.299 2015/09/23 08:49:46 mpi Exp $ */ +/* $OpenBSD: ip_output.c,v 1.300 2015/10/07 14:52:45 deraadt Exp $ */ /* $NetBSD: ip_output.c,v 1.28 1996/02/13 23:43:07 christos Exp $ */ /* @@ -1492,7 +1492,9 @@ ip_setmoptions(int optname, struct ip_moptions **imop, struct mbuf *m, bcopy(omships, nmships, sizeof(*omships) * imo->imo_max_memberships); - free(omships, M_IPMOPTS, 0); + free(omships, M_IPMOPTS, + sizeof(*omships) * + imo->imo_max_memberships); imo->imo_membership = nmships; imo->imo_max_memberships = newmax; } -- 2.20.1