All of lore.kernel.org
 help / color / mirror / Atom feed
From: Szymon Janc <szymon.janc@tieto.com>
To: Jakub Tyszkowski <jakub.tyszkowski@tieto.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 1/2] android/gatt: Fix not freeing discover_srvc_data
Date: Wed, 18 Jun 2014 15:40:24 +0200	[thread overview]
Message-ID: <1788801.NPzh0SoE2F@uw000953> (raw)
In-Reply-To: <1403096334-23297-1-git-send-email-jakub.tyszkowski@tieto.com>

Hi Jakub,

On Wednesday 18 of June 2014 14:58:53 Jakub Tyszkowski wrote:
> This fixes the following issue:
> 
> 32 bytes in 1 blocks are definitely lost in loss record 92 of 142
> ==19365==    at 0x4C29DB4: calloc (in
> /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==19365==    by 0x43275A: search_dev_for_srvc (gatt.c:1302)
> ==19365==    by 0x4354C9: connect_cb (gatt.c:1424)
> ==19365==    by 0x448AD3: accept_cb (btio.c:203)
> ==19365==    by 0x4E79D12: g_main_context_dispatch (in
> /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.4)
> ==19365==    by 0x4E7A05F: ??? (in
> /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.4)
> ==19365==    by 0x4E7A459: g_main_loop_run (in
> /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.4)
> ==19365==    by 0x40459D: main (main.c:538)
> ---
>  android/gatt.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/android/gatt.c b/android/gatt.c
> index b256077..7dd37ab 100644
> --- a/android/gatt.c
> +++ b/android/gatt.c
> @@ -1245,11 +1245,15 @@ static void discover_primary_cb(uint8_t status, GSList *services,
>  	if (status) {
>  		error("gatt: Discover all primary services failed: %s",
>  							att_ecode2str(status));
> +		free(cb_data);
> +
>  		return;
>  	}
>  
>  	if (!services) {
>  		info("gatt: No primary services found");
> +		free(cb_data);
> +
>  		return;
>  	}
>  
> 

Both patches applied. Thanks.

-- 
Best regards, 
Szymon Janc

      parent reply	other threads:[~2014-06-18 13:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-18 12:58 [PATCH 1/2] android/gatt: Fix not freeing discover_srvc_data Jakub Tyszkowski
2014-06-18 12:58 ` [PATCH 2/2] android/gatt: Minor coding style fix Jakub Tyszkowski
2014-06-18 13:40 ` Szymon Janc [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=1788801.NPzh0SoE2F@uw000953 \
    --to=szymon.janc@tieto.com \
    --cc=jakub.tyszkowski@tieto.com \
    --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.