summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2011-02-11 12:16:31 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2011-02-11 12:16:31 +0000
commiteeda3d38d3048a5ba1e7b61767b7c939e0cfa6bb (patch)
treedf2f977e1bedf7e1ee8d6a22cb3bf183fd49372f
parent329144408612b5ff1a5c79ce6b1488a404e97fe9 (diff)
In ip_forward() free the mbuf chain mcopy with m_freem() instead
of m_free(). The was no leak before as m_copym() and m_pullup() are always called with the same length. But it is better to use the correct function anyway. ok henning@ mpf@ markus@
-rw-r--r--sys/netinet/ip_input.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index ab401781a91..838069e54a6 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_input.c,v 1.185 2011/02/03 17:29:16 millert Exp $ */
+/* $OpenBSD: ip_input.c,v 1.186 2011/02/11 12:16:30 bluhm Exp $ */
/* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */
/*
@@ -1578,7 +1578,7 @@ ip_forward(m, srcrt)
freecopy:
if (mcopy)
- m_free(mcopy);
+ m_freem(mcopy);
freert:
#ifndef SMALL_KERNEL
if (ipmultipath && ipforward_rt.ro_rt &&