mem leak in mii ?

Bjoern A. Zeeb bzeeb-lists at lists.zabbadoz.net
Mon Nov 22 14:10:10 PST 2004


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


More information about the freebsd-current mailing list