Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Nov 2004 22:08:24 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        freebsd-current@FreeBSD.org
Subject:   Re: mem leak in mii ?
Message-ID:  <Pine.BSF.4.53.0411222203250.66570@e0-0.zab2.int.zabbadoz.net>
In-Reply-To: <200411221644.57047.jhb@FreeBSD.org>
References:  <Pine.BSF.4.53.0411192340590.42526@e0-0.zab2.int.zabbadoz.net> <200411221644.57047.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 22 Nov 2004, John Baldwin wrote:

> On Friday 19 November 2004 06:49 pm, Bjoern A. Zeeb wrote:
> > Hi,
> >
> > in sys/dev/mii/mii.c there are two calls to malloc for ivars;
> > see for example mii_phy_probe:
...
> > Where is the free for this malloc ? I cannot find it.
> >
> > analogous: miibus_probe ?
>
> It's a leak.  It should be free'd when the miibus device is destroyed.  Here's
> a possible fix:

this does only catch about 75% of what may happen I think.

mii isn't very error checking at all and I have run into even more
problems while remotely debugging other problems with someone.

I am currently working on a hopefully more complete fix (there are
two leaks actually).

-- 
Bjoern A. Zeeb				bzeeb at Zabbadoz dot NeT



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.53.0411222203250.66570>