[PATCH 3/3] gatttool: Remove extra reference to the connection IO Channel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As we want the connection to be closed when the last GAttrib
reference is dropped, we don't need to keep this reference.
---
 attrib/gatttool.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/attrib/gatttool.c b/attrib/gatttool.c
index 7478043..547757d 100644
--- a/attrib/gatttool.c
+++ b/attrib/gatttool.c
@@ -620,6 +620,7 @@ int main(int argc, char *argv[])
 	}
 
 	attrib = g_attrib_new(chan);
+	g_io_channel_unref(chan);
 
 	event_loop = g_main_loop_new(NULL, FALSE);
 
@@ -634,7 +635,6 @@ int main(int argc, char *argv[])
 
 	g_main_loop_unref(event_loop);
 
-	g_io_channel_unref(chan);
 	g_attrib_unref(attrib);
 
 done:
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux