diff options
author | Denis Kenzior <denkenz@gmail.com> | 2015-10-14 11:27:48 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2015-10-14 11:27:48 -0500 |
commit | 2ca04c154a75584440c8fd0dd5921b5be8326886 (patch) | |
tree | 583051c008a77d3099d14017c17566075f2b2547 | |
parent | 69c80c9efe5520c432627dd68f6956a4f74c9ac3 (diff) | |
download | ofono-2ca04c154a75584440c8fd0dd5921b5be8326886.tar.bz2 |
gril: Fix IO reference counting
-rw-r--r-- | gril/gril.c | 2 | ||||
-rw-r--r-- | gril/grilio.c | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/gril/gril.c b/gril/gril.c index ae27f304..ddedc66a 100644 --- a/gril/gril.c +++ b/gril/gril.c @@ -877,6 +877,8 @@ static struct ril_s *create_ril(const char *sock_path) g_io_channel_set_flags(io, G_IO_FLAG_NONBLOCK, NULL); ril->io = g_ril_io_new(io); + g_io_channel_unref(io); + if (ril->io == NULL) { ofono_error("create_ril: can't create ril->io"); goto error; diff --git a/gril/grilio.c b/gril/grilio.c index 14ae908d..f02d0e48 100644 --- a/gril/grilio.c +++ b/gril/grilio.c @@ -72,7 +72,6 @@ static void read_watcher_destroy_notify(gpointer user_data) io->read_handler = NULL; io->read_data = NULL; - g_io_channel_unref(io->channel); io->channel = NULL; if (io->destroyed) |