From: Johan Hedberg <johan.hedberg@gmail.com>
To: Anderson Lizardo <anderson.lizardo@openbossa.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] Fix refcount in btd_adapter_any_request_path()
Date: Fri, 4 Feb 2011 06:58:48 +0200 [thread overview]
Message-ID: <20110204045848.GD1551@jh-x301> (raw)
In-Reply-To: <1296792331-467-1-git-send-email-anderson.lizardo@openbossa.org>
Hi Lizardo,
On Fri, Feb 04, 2011, Anderson Lizardo wrote:
> adapter_any_refcount was not being incremented when a pointer to
> allocated buffer was returned.
> ---
> src/adapter.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/src/adapter.c b/src/adapter.c
> index 08098a5..3e609c1 100644
> --- a/src/adapter.c
> +++ b/src/adapter.c
> @@ -3428,11 +3428,10 @@ const char *adapter_any_get_path(void)
>
> const char *btd_adapter_any_request_path(void)
> {
> - if (adapter_any_refcount > 0)
> + if (adapter_any_refcount++ > 0)
> return adapter_any_path;
>
> adapter_any_path = g_strdup_printf("%s/any", manager_get_base_path());
> - adapter_any_refcount++;
>
> return adapter_any_path;
> }
Nice catch. The patch has been pushed upstream. Thanks.
Johan
prev parent reply other threads:[~2011-02-04 4:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-04 4:05 [PATCH] Fix refcount in btd_adapter_any_request_path() Anderson Lizardo
2011-02-04 4:58 ` 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=20110204045848.GD1551@jh-x301 \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox