From: Johan Hedberg <johan.hedberg@gmail.com>
To: Anderson Lizardo <anderson.lizardo@openbossa.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [RFC BlueZ] adapter: Fix memory leak on discovery cleanup
Date: Thu, 18 Oct 2012 10:33:24 +0300 [thread overview]
Message-ID: <20121018073324.GA2031@x220> (raw)
In-Reply-To: <1350515709-30389-1-git-send-email-anderson.lizardo@openbossa.org>
Hi Lizardo,
On Wed, Oct 17, 2012, Anderson Lizardo wrote:
> During discovery cleanup, it was attempted to send a DevicesFound()
> D-Bus signal for pending found devices, but adapter->discovery was set
> to NULL before calling send_devices_found(), therefore it never sent any
> signal (and there was a leak of discovery->pending list).
>
> Fixes this memory leak when pairing two LE devices:
>
> ==1822== 8 bytes in 1 blocks are definitely lost in loss record 42 of
> 246
> ==1822== at 0x482BE68: malloc (in
> /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
> ==1822== by 0x48869AA: standard_malloc (gmem.c:85)
> ==1822== by 0x4886E42: g_malloc (gmem.c:159)
> ==1822== by 0x489B26D: g_slice_alloc (gslice.c:1003)
> ==1822== by 0x489C10A: g_slist_prepend (gslist.c:265)
> ==1822== by 0x1855AE: adapter_update_found_devices (adapter.c:2846)
> ==1822== by 0x191431: btd_event_device_found (event.c:260)
> ==1822== by 0xBC01001A: ???
> ==1822==
> ---
> src/adapter.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Applied. Thanks.
Johan
prev parent reply other threads:[~2012-10-18 7:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-17 23:15 [RFC BlueZ] adapter: Fix memory leak on discovery cleanup Anderson Lizardo
2012-10-18 7:33 ` Johan Hedberg [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121018073324.GA2031@x220 \
--to=johan.hedberg@gmail.com \
--cc=anderson.lizardo@openbossa.org \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.