conn->io should be set to NULl after unref to avoid calling shutdown and unref twice. --- sap/server.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sap/server.c b/sap/server.c index f66e23f..c385baa 100644 --- a/sap/server.c +++ b/sap/server.c @@ -567,6 +567,7 @@ static gboolean guard_timeout(gpointer data) if (conn->io) { g_io_channel_shutdown(conn->io, TRUE, NULL); g_io_channel_unref(conn->io); + conn->io = NULL; } break; @@ -686,6 +687,7 @@ int sap_disconnect_rsp(void *sap_device) if (conn->io) { g_io_channel_shutdown(conn->io, TRUE, NULL); g_io_channel_unref(conn->io); + conn->io = NULL; } return 0; -- on behalf of ST-Ericsson -- 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