Hi,

Shouldn't this be an m_freem() in ip_forward()?  The m_free() was
introduced in revision 1.142.

There seems to be no leak at the moment because mcopy is at most
68 bytes long and m_pullup() can put it all into one mbuf and frees
the cluster.  But that is just good look, m_freem() would be the
correct function.

ok?

bluhm


Index: netinet/ip_input.c
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/sys/netinet/ip_input.c,v
retrieving revision 1.185
diff -u -p -r1.185 ip_input.c
--- netinet/ip_input.c  3 Feb 2011 17:29:16 -0000       1.185
+++ netinet/ip_input.c  10 Feb 2011 20:49:51 -0000
@@ -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 &&

Reply via email to