projects
/
framework
/
connectivity
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9db1fb9
)
Unref GIOChannel in g_at_chat_new_from_tty
author
Zhenhua Zhang
<zhenhua.zhang@intel.com>
Wed, 23 Sep 2009 10:57:17 +0000
(18:57 +0800)
committer
Marcel Holtmann
<marcel@holtmann.org>
Thu, 24 Sep 2009 17:01:54 +0000
(10:01 -0700)
gatchat/gatchat.c
patch
|
blob
|
history
diff --git
a/gatchat/gatchat.c
b/gatchat/gatchat.c
index
5b3a214
..
8407338
100644
(file)
--- a/
gatchat/gatchat.c
+++ b/
gatchat/gatchat.c
@@
-984,6
+984,7
@@
GAtChat *g_at_chat_new_from_tty(const char *device, GAtSyntax *syntax)
{
GIOChannel *channel;
int fd;
+ GAtChat *chat;
fd = open_device(device);
if (fd < 0)
@@
-995,7
+996,9
@@
GAtChat *g_at_chat_new_from_tty(const char *device, GAtSyntax *syntax)
return NULL;
}
- return g_at_chat_new(channel, syntax);
+ chat = g_at_chat_new(channel, syntax);
+ g_io_channel_unref(channel);
+ return chat;
}
GAtChat *g_at_chat_ref(GAtChat *chat)