Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH] Fix adapter reference count in input plugin
@ 2011-03-02  9:44 Szymon Janc
  2011-03-04 18:38 ` Johan Hedberg
  0 siblings, 1 reply; 3+ messages in thread
From: Szymon Janc @ 2011-03-02  9:44 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: par-gunnar.p.hjalmdahl, henrik.possung, Szymon Janc

Adapter unref was called  on driver removal even if input server failed
to start on probe and reference was not incremented. This leads to
segmentation fault while removing adapter.
---
 input/manager.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/input/manager.c b/input/manager.c
index a98a080..259aef7 100644
--- a/input/manager.c
+++ b/input/manager.c
@@ -143,6 +143,9 @@ static void hid_server_remove(struct btd_adapter *adapter)
 {
 	bdaddr_t src;
 
+	if (!g_slist_find(adapters, adapter))
+		return;
+
 	adapter_get_address(adapter, &src);
 
 	server_stop(&src);
-- 
1.7.0.4
on behalf of ST-Ericsson

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-03-04 19:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-02  9:44 [PATCH] Fix adapter reference count in input plugin Szymon Janc
2011-03-04 18:38 ` Johan Hedberg
2011-03-04 19:02   ` Szymon Janc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox