From owner-freebsd-current@FreeBSD.ORG Mon Nov 22 22:10:10 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 57F1E16A4CE; Mon, 22 Nov 2004 22:10:10 +0000 (GMT) Received: from transport.cksoft.de (transport.cksoft.de [62.111.66.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 800E743D2D; Mon, 22 Nov 2004 22:10:09 +0000 (GMT) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from transport.cksoft.de (localhost [127.0.0.1]) by transport.cksoft.de (Postfix) with ESMTP id B8A981FFACA; Mon, 22 Nov 2004 23:10:07 +0100 (CET) Received: by transport.cksoft.de (Postfix, from userid 66) id D4F981FF9AD; Mon, 22 Nov 2004 23:10:05 +0100 (CET) Received: by mail.int.zabbadoz.net (Postfix, from userid 1060) id 0F53C15712; Mon, 22 Nov 2004 22:08:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.int.zabbadoz.net (Postfix) with ESMTP id 04C94156F3; Mon, 22 Nov 2004 22:08:24 +0000 (UTC) Date: Mon, 22 Nov 2004 22:08:24 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@e0-0.zab2.int.zabbadoz.net To: John Baldwin In-Reply-To: <200411221644.57047.jhb@FreeBSD.org> Message-ID: References: <200411221644.57047.jhb@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS cksoft-s20020300-20031204bz on transport.cksoft.de cc: freebsd-current@FreeBSD.org Subject: Re: mem leak in mii ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Nov 2004 22:10:10 -0000 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