From owner-freebsd-drivers@FreeBSD.ORG Wed Nov 7 21:51:32 2007 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3DEB916A46B for ; Wed, 7 Nov 2007 21:51:32 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.228]) by mx1.freebsd.org (Postfix) with ESMTP id EE70113C4AC for ; Wed, 7 Nov 2007 21:51:31 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: by nz-out-0506.google.com with SMTP id l8so1621286nzf for ; Wed, 07 Nov 2007 13:51:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=4QrQaB3T4a77ZH/PQNv/eVZuzuL2ae4xAEFsZ/Rtvbo=; b=N0Phc6zXEbIQLsdQGBia+JrHz3Z64xoWpU/WT9j1jp8AS+SsMO0erLOMsRuTztDk1H5jeh+c8AOuD//hQv/az1H8xRJCCg3UeLraOA9N58BH9BDlVMU72F10rU4BGfy/YiDnUnx/erVxr+iS8KAvG4WLbABTQdy/aRS+Q+i9Vpg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=fDKidaLVPF33gzfe5yUsElYmRVN1dXj8upToC2Wa0sE12mYrKoBiGKL+0kGqNgT7WdFBCHu9RTMet4hx+gadmTFr350tp7MciOqQY/PNcoECmrsH/Y0O/HE5MgGB/8c33djJepy4KnfAQpLoVPQjIm3wVNpRoRDO+uEZRkLjTPY= Received: by 10.142.82.17 with SMTP id f17mr2380847wfb.1194470663392; Wed, 07 Nov 2007 13:24:23 -0800 (PST) Received: by 10.142.233.5 with HTTP; Wed, 7 Nov 2007 13:24:23 -0800 (PST) Message-ID: <2d1264630711071324s32eda7d7j8d12ccff20df900a@mail.gmail.com> Date: Wed, 7 Nov 2007 15:24:23 -0600 From: "Jason Harmening" To: freebsd-drivers@freebsd.org In-Reply-To: <2d1264630711061422r4d76480bp7be0a70823388db3@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <2d1264630711061422r4d76480bp7be0a70823388db3@mail.gmail.com> Subject: iicbus ivars and BUS_ADD_CHILD X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Nov 2007 21:51:32 -0000 Hi everyone, I've been looking over the 7.0 iicbus code, and I see that the iicbus driver now uses an ivar to store the address for each child device (cool!). The ivar is malloc'ed in the iicbus implementation of BUS_ADD_CHILD, but it doesn't ever appear to be freed. And bus_if.m doesn't appear to contain a reciprocal for BUS_ADD_CHILD (e.g. BUS_DELETE_CHILD) that would take care of bus-specific cleanup. Are ivars just leaked right now when device_delete_child() is called on the child device, or is the caller of device_delete_child() expected to free them? Thanks, Jason