Thread (4 messages) 4 messages, 2 authors, 2011-02-24
STALE5633d

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

From: Vinicius Costa Gomes <hidden>
Date: 2011-02-24 20:34:28
Subsystem: the rest · Maintainer: Linus Torvalds

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help