gril: Fix IO reference counting

This commit is contained in:
Denis Kenzior 2015-10-14 11:27:48 -05:00
parent 69c80c9efe
commit 2ca04c154a
2 changed files with 2 additions and 1 deletions

View File

@ -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;

View File

@ -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)