*BSD News Article 80432


Return to BSD News archive

Newsgroups: comp.bugs.4bsd
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.Hawaii.Edu!news.uoregon.edu!arclight.uoregon.edu!nntp.primenet.com!news.mathworks.com!fu-berlin.de!zrz.TU-Berlin.DE!news.dfn.de!news.ruhr-uni-bochum.de!news.rhrz.uni-bonn.de!mpifr-bonn.mpg.de!fs1.mpifr-bonn.mpg.de!souva
From: souva@aibn55.astro.uni-bonn.de (Ignatios Souvatzis)
Subject: Re: un-freed mbuf in ip_output
In-Reply-To: jinmei@isl.rdc.toshiba.co.jp's message of 07 Oct 1996 18:03:52
	+0900
Message-ID: <SOUVA.96Oct11202107@aibn55.astro.uni-bonn.de>
Sender: news@mpifr-bonn.mpg.de
Nntp-Posting-Host: aibn55
Reply-To: isouvatzis@astro.uni-bonn.de
Organization: Radioastronomisches Institut der Universitaet Bonn, Bonn, FRG
References: <52srh5$hip@monaco.csl.rdc.toshiba.co.jp> <Dyq3DE.59@world.std.com>
	<531ovb$dnb@fido.asd.sgi.com> <53ah45$1o6@monaco.csl.rdc.toshiba.co.jp>
Date: Fri, 11 Oct 1996 18:21:07 GMT
Lines: 25

In article <53ah45$1o6@monaco.csl.rdc.toshiba.co.jp>
jinmei@isl.rdc.toshiba.co.jp (JINMEI Tatuya) writes:

   >>>>> On 4 Oct 1996 01:23:55 GMT, 
   >>>>> bitbug@seal.engr.sgi.com (James Buster) said:

   >> I believe m_freem() frees the whole mbuf list -- that is, the whole
   >> packet -- not just the first mbuf.  Go read m_freem().

   > m_freem() does in fact free the whole mbuf chain. This doesn't
   > help you, as extra mbuf in question is *prepended*, not appended,
   > to the mbuf chain.

   Thank you for supplying my poor explanation. As James said, the point
   is that "m0" is not the *head* of the outgoing packet.

You are right (tested this on a NetBSD-1.2_BETA machine, and just
fixed it in NetBSD-current). The fix is to do a m_freem(m) instead of
m_freem(m0) at label bad:.

Regards,
	Ignatios Souvatzis
-- 
 MS-DOS is the worst text adventure game I have ever played: poor vocabulary,
                       weak parser and a boring storyline.