summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/glib-helper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/glib-helper.c b/common/glib-helper.c
index c05ac5c5..93e9c27a 100644
--- a/common/glib-helper.c
+++ b/common/glib-helper.c
@@ -775,7 +775,7 @@ static BtIOError sco_connect(BtIO *io, BtIOFunc func)
{
struct io_context *io_ctxt = io->io_ctxt;
struct sockaddr_sco addr;
- int sk, err;
+ int err;
io_ctxt->func = func;
@@ -790,7 +790,7 @@ static BtIOError sco_connect(BtIO *io, BtIOFunc func)
err = transport_connect(io, (struct sockaddr *) &addr,
sizeof(addr));
if (err < 0) {
- close(sk);
+ close(io_ctxt->fd);
return BT_IO_FAILED;
}