From owner-freebsd-new-bus@FreeBSD.ORG Tue Nov 6 22:47:32 2007 Return-Path: Delivered-To: freebsd-new-bus@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E07C16A418 for ; Tue, 6 Nov 2007 22:47:32 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: from el-out-1112.google.com (el-out-1112.google.com [209.85.162.183]) by mx1.freebsd.org (Postfix) with ESMTP id 2DE9713C481 for ; Tue, 6 Nov 2007 22:47:31 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: by el-out-1112.google.com with SMTP id s27so514067ele for ; Tue, 06 Nov 2007 14:47:31 -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:mime-version:content-type:content-transfer-encoding:content-disposition; bh=4QrQaB3T4a77ZH/PQNv/eVZuzuL2ae4xAEFsZ/Rtvbo=; b=krflrUcJqVGzYfUOD5XF0T7rsj/Oob5nZaLjsAmnfpIQ9BsLTVmuE/JWgUdooiFk3Dz5V3Bq6mjutoCocp5cY9NctnSbvSrlCLz3HQMsgZQ8o+4h2zgl6EGblWzhmir6JHWZA2TPUsuhnNQ+71zQySQSqxcgkA4NqKZtxgRrES0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=J3O5sh+k/ahToYwFN4ICDsfECl6+ESObScH6xjgD2Aeknwr05glWLZwom2LQ2HBmiVMgtEXo+E5DwSFdc03sb/mXdWSF0hrkNRb5nBQYmlyOfKlVYDYeQG1jbP+cCwizDtAu/ZHygJpJUUdOiG4ZdAAAff5d+H0voSFHMxkQgJM= Received: by 10.143.157.10 with SMTP id j10mr1882243wfo.1194387747606; Tue, 06 Nov 2007 14:22:27 -0800 (PST) Received: by 10.142.233.5 with HTTP; Tue, 6 Nov 2007 14:22:27 -0800 (PST) Message-ID: <2d1264630711061422r4d76480bp7be0a70823388db3@mail.gmail.com> Date: Tue, 6 Nov 2007 16:22:27 -0600 From: "Jason Harmening" To: freebsd-new-bus@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: iicbus ivars and BUS_ADD_CHILD X-BeenThere: freebsd-new-bus@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD's new-bus architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Nov 2007 22:47: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