diff options
author | Zhenhua Zhang <zhenhua.zhang@intel.com> | 2009-09-23 18:57:17 +0800 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-09-24 10:01:54 -0700 |
commit | 0eca0efbf6e7481995155107bdeb7277efcd4c0c (patch) | |
tree | 60344d3cbe8a48465dd2832d22c4bc17b91a49f9 /gatchat | |
parent | 9db1fb9ed5ef865867079ba304fc44031ea1ef91 (diff) | |
download | connman-0eca0efbf6e7481995155107bdeb7277efcd4c0c.tar.gz connman-0eca0efbf6e7481995155107bdeb7277efcd4c0c.tar.bz2 connman-0eca0efbf6e7481995155107bdeb7277efcd4c0c.zip |
Unref GIOChannel in g_at_chat_new_from_tty
Diffstat (limited to 'gatchat')
-rw-r--r-- | gatchat/gatchat.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gatchat/gatchat.c b/gatchat/gatchat.c index 5b3a2146..8407338b 100644 --- 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) |