I don't see how NULLing a pointer will fix this problem: it will just segfault at a different location due to a NULL pointer dereference.
It appears the problem is that io_callback() is getting invoked after geis_finish() has been called, because the g_io channel is getting flushed. Since we don't care what's in the g_io channel, I would think the best solution is ti set the second argument to g_io_channel_shutdown() to FALSE.
I don't see how NULLing a pointer will fix this problem: it will just segfault at a different location due to a NULL pointer dereference.
It appears the problem is that io_callback() is getting invoked after geis_finish() has been called, because the g_io channel is getting flushed. Since we don't care what's in the g_io channel, I would think the best solution is ti set the second argument to g_io_channel_ shutdown( ) to FALSE.