Date: Wed, 07 Nov 2007 15:06:02 -0700 (MST) From: "M. Warner Losh" <imp@bsdimp.com> To: jason.harmening@gmail.com Cc: freebsd-drivers@freebsd.org Subject: Re: iicbus ivars and BUS_ADD_CHILD Message-ID: <20071107.150602.756907466.imp@bsdimp.com> In-Reply-To: <2d1264630711071324s32eda7d7j8d12ccff20df900a@mail.gmail.com> References: <2d1264630711061422r4d76480bp7be0a70823388db3@mail.gmail.com> <2d1264630711071324s32eda7d7j8d12ccff20df900a@mail.gmail.com>
index | next in thread | previous in thread | raw e-mail
In message: <2d1264630711071324s32eda7d7j8d12ccff20df900a@mail.gmail.com>
"Jason Harmening" <jason.harmening@gmail.com> writes:
: 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?
Generally, all callers of device_delete_child() are expected to know.
Where is that being called?
Warner
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071107.150602.756907466.imp>
