mirror of git://git.sysmocom.de/ofono
gril: Fix IO reference counting
This commit is contained in:
parent
69c80c9efe
commit
2ca04c154a
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue