From: Szymon Janc <szymon.janc@gmail.com>
To: Andrei Emeltchenko <Andrei.Emeltchenko.news@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] health: Fix not setting error
Date: Tue, 17 Jun 2014 20:55:10 +0200 [thread overview]
Message-ID: <2367616.CAGmRrXdpA@athlon> (raw)
In-Reply-To: <1403013181-8793-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>
Hi Andrei,
On Tuesday 17 June 2014 16:53:01 Andrei Emeltchenko wrote:
> From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
>
> When error is not set err->message may be accessed from the other code
> resulting in NULL dereference.
> ---
> android/mcap-lib.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/android/mcap-lib.c b/android/mcap-lib.c
> index b04eaac..e0e1258 100644
> --- a/android/mcap-lib.c
> +++ b/android/mcap-lib.c
> @@ -1932,6 +1932,8 @@ gboolean mcap_create_mcl(struct mcap_instance *mi,
> }
> mcap_mcl_unref(con->mcl);
> g_free(con);
> + g_set_error(err, MCAP_ERROR, MCAP_ERROR_FAILED,
> + "MCP connect failed");
> return FALSE;
> }
Wouldn't error be already set by bt_io_connect() in that case?
--
Szymon K. Janc
szymon.janc@gmail.com
prev parent reply other threads:[~2014-06-17 18:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-17 13:53 [PATCH] health: Fix not setting error Andrei Emeltchenko
2014-06-17 18:55 ` 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=2367616.CAGmRrXdpA@athlon \
--to=szymon.janc@gmail.com \
--cc=Andrei.Emeltchenko.news@gmail.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