--- src/attrib-server.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/attrib-server.c b/src/attrib-server.c index 18759e7..cbc01ee 100644 --- a/src/attrib-server.c +++ b/src/attrib-server.c @@ -724,6 +724,7 @@ static void connect_event(GIOChannel *io, GError *err, void *user_data) channel->attrib = g_attrib_new(io); channel->mtu = ATT_DEFAULT_MTU; + g_io_channel_unref(io); channel->id = g_attrib_register(channel->attrib, GATTRIB_ALL_EVENTS, channel_handler, channel, NULL); @@ -803,6 +804,11 @@ failed: g_io_channel_unref(l2cap_io); l2cap_io = NULL; + if (le_io) { + g_io_channel_unref(le_io); + le_io = NULL; + } + return -1; } -- 1.7.3.4 -- 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