Linux bluetooth development
 help / color / mirror / Atom feed
From: Szymon Janc <szymon.janc@tieto.com>
To: Andrzej Kaczmarek <andrzej.kaczmarek@tieto.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] android/avdtp: Fix crash when DISCOVER failed
Date: Wed, 05 Mar 2014 16:46:04 +0100	[thread overview]
Message-ID: <3751014.xU7GndY0WZ@uw000953> (raw)
In-Reply-To: <1394028150-2199-1-git-send-email-andrzej.kaczmarek@tieto.com>

Hi Andrzej,

On Wednesday 05 of March 2014 15:02:30 Andrzej Kaczmarek wrote:
> Discover callback is only set when avdtp_discover was successful so we
> need to check if it's set before calling.
> ---
>  android/avdtp.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/android/avdtp.c b/android/avdtp.c
> index f104e3e..96c7d0d 100644
> --- a/android/avdtp.c
> +++ b/android/avdtp.c
> @@ -937,7 +937,8 @@ static void finalize_discovery(struct avdtp *session, int err)
>  	if (discover->id > 0)
>  		g_source_remove(discover->id);
>  
> -	discover->cb(session, session->seps, err ? &avdtp_err : NULL,
> +	if (discover->cb)
> +		discover->cb(session, session->seps, err ? &avdtp_err : NULL,
>  							discover->user_data);
>  	g_free(discover);
>  }
> 

Applied.

-- 
Best regards, 
Szymon Janc

      reply	other threads:[~2014-03-05 15:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-05 14:02 [PATCH] android/avdtp: Fix crash when DISCOVER failed Andrzej Kaczmarek
2014-03-05 15:46 ` 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=3751014.xU7GndY0WZ@uw000953 \
    --to=szymon.janc@tieto.com \
    --cc=andrzej.kaczmarek@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox