Re: [PATCH 3/3] Fix memory leaks in btio/btio.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Luiz,

On Mon, Dec 20, 2010 at 5:20 AM, Luiz Augusto von Dentz
<luiz.dentz@xxxxxxxxx> wrote:
> While I see the reference problem I don't really see how this could
> help since the application doesn't know about internal watches only
> the reference returned, so if the application releases its references
> btio won't release its own and in fact it can still call the
> application callbacks.

Sorry, but I don't understand the issue you describe here. The watch
created by e.g. bt_io_listen() needs to be destroyed at some point,
otherwise any destroy callbacks registered by the btio users will
never be called, and the reference added by the watch itself is not
decremented. You can see this by running valgrind with
--leak-check=yes with/without these patches.

Doing this during the daemon shutdown seems a good place, as it will
do other memory deallocations anyway.

Regards,
-- 
Anderson Lizardo
OpenBossa Labs - INdT
Manaus - Brazil
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux