From: Anderson Lizardo <anderson.lizardo@openbossa.org>
To: linux-bluetooth@vger.kernel.org
Cc: Anderson Lizardo <anderson.lizardo@openbossa.org>
Subject: [PATCH] Fix refcount in btd_adapter_any_request_path()
Date: Fri, 4 Feb 2011 00:05:31 -0400 [thread overview]
Message-ID: <1296792331-467-1-git-send-email-anderson.lizardo@openbossa.org> (raw)
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;
}
--
1.7.0.4
next reply other threads:[~2011-02-04 4:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-04 4:05 Anderson Lizardo [this message]
2011-02-04 4:58 ` [PATCH] Fix refcount in btd_adapter_any_request_path() Johan Hedberg
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=1296792331-467-1-git-send-email-anderson.lizardo@openbossa.org \
--to=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