summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--serial/manager.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/serial/manager.c b/serial/manager.c
index dd776ac8..eb49f8e9 100644
--- a/serial/manager.c
+++ b/serial/manager.c
@@ -375,6 +375,7 @@ static void rfcomm_connect_cb(GIOChannel *chan, int err_cb, gpointer user_data)
sk = g_io_channel_unix_get_fd(chan);
pc->id = ioctl(sk, RFCOMMCREATEDEV, &req);
+ g_io_channel_unref(chan);
if (pc->id < 0) {
err = errno;
error("ioctl(RFCOMMCREATEDEV): %s (%d)", strerror(err), err);