In case of incoming RFCOMM connection, manager calls gateway_connect_rfcomm which already take reference to GIOChannel, hence no need to take another one. --- audio/gateway.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/audio/gateway.c b/audio/gateway.c index 945477e..f3e6c6a 100644 --- a/audio/gateway.c +++ b/audio/gateway.c @@ -325,7 +325,8 @@ static void rfcomm_connect_cb(GIOChannel *chan, GError *err, sk = g_io_channel_unix_get_fd(chan); - gw->rfcomm = g_io_channel_ref(chan); + if (gw->rfcomm == NULL) + gw->rfcomm = g_io_channel_ref(chan); ret = agent_sendfd(gw->agent, sk, newconnection_reply, dev); -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html