summaryrefslogtreecommitdiffstats
path: root/hcid/dbus-sdp.c
diff options
context:
space:
mode:
Diffstat (limited to 'hcid/dbus-sdp.c')
-rw-r--r--hcid/dbus-sdp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hcid/dbus-sdp.c b/hcid/dbus-sdp.c
index 2a448af4..c378b5b5 100644
--- a/hcid/dbus-sdp.c
+++ b/hcid/dbus-sdp.c
@@ -506,7 +506,7 @@ static gboolean search_session_handle_cb(GIOChannel *chan, GIOCondition cond, vo
return TRUE;
fail:
- g_io_channel_close(chan);
+ g_io_channel_unref(chan);
return retval;
}
@@ -671,6 +671,7 @@ static int search_request(DBusConnection *conn, DBusMessage *msg, uint16_t dev_i
}
chan = g_io_channel_unix_new(sk);
+ g_io_channel_set_close_on_unref(chan, TRUE);
sa.l2_family = AF_BLUETOOTH;
sa.l2_psm = 0;
@@ -712,7 +713,7 @@ static int search_request(DBusConnection *conn, DBusMessage *msg, uint16_t dev_i
return 0;
fail:
if (chan)
- g_io_channel_close(chan);
+ g_io_channel_unref(chan);
if (c)
pending_connect_free(c);