summaryrefslogtreecommitdiff
path: root/src/adapter.c
diff options
context:
space:
mode:
authorVinicius Costa Gomes <vinicius.gomes@openbossa.org>2012-05-21 14:59:41 -0300
committerSamuel Ortiz <sameo@linux.intel.com>2012-05-25 14:53:26 +0200
commit306d698ef3e5bb6872ac6b1b0ce1bc9cc4e333f3 (patch)
treef7f08f8615c13054d8b76258853e2722fb9aaf62 /src/adapter.c
parentce3665cfd7875b19dab3a8c96de565413ba8ec1a (diff)
downloadneard-306d698ef3e5bb6872ac6b1b0ce1bc9cc4e333f3.tar.gz
neard-306d698ef3e5bb6872ac6b1b0ce1bc9cc4e333f3.tar.bz2
neard-306d698ef3e5bb6872ac6b1b0ce1bc9cc4e333f3.zip
adapter: Fix GIOChannel leak
As we are not using channel anymore we may drop this reference, and let GLib clean it up, closing the file descriptor.
Diffstat (limited to 'src/adapter.c')
-rw-r--r--src/adapter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/adapter.c b/src/adapter.c
index bea2fcf..02a0329 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -903,8 +903,8 @@ int near_adapter_disconnect(uint32_t idx)
adapter->watch = 0;
}
+ g_io_channel_unref(adapter->channel);
adapter->channel = NULL;
- close(adapter->tag_sock);
adapter->tag_sock = -1;
adapter->tag_link = NULL;