aboutsummaryrefslogtreecommitdiffstats
path: root/attrib/client.c
diff options
context:
space:
mode:
authorVinicius Costa Gomes <vinicius.gomes@openbossa.org>2010-09-09 18:02:00 -0300
committerAnderson Lizardo <anderson.lizardo@openbossa.org>2010-09-13 11:59:28 -0400
commit818a4ca92235e201acfa9d904b9f1c557160f76f (patch)
tree7f1c39b6b59d65b62332142b331c0fa56264f195 /attrib/client.c
parentdbf642ce320cc7241d78823dc4143a1fe71c35a7 (diff)
downloadbluez-818a4ca92235e201acfa9d904b9f1c557160f76f.tar.gz
bluez-818a4ca92235e201acfa9d904b9f1c557160f76f.tar.xz
bluez-818a4ca92235e201acfa9d904b9f1c557160f76f.zip
Fix a file descriptor leak on GATT client
In some cases, there could be a file descriptor leak, when the connection is not succesful. As the connection callback keeps a reference, there's no problem unref'ing it at this point.
Diffstat (limited to 'attrib/client.c')
-rw-r--r--attrib/client.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/attrib/client.c b/attrib/client.c
index c3d858d3..3111922f 100644
--- a/attrib/client.c
+++ b/attrib/client.c
@@ -1029,6 +1029,8 @@ int attrib_client_register(bdaddr_t *sba, bdaddr_t *dba, const char *path,
return -1;
}
+ g_io_channel_unref(io);
+
return 0;
}