g_cancellable_cancell can be called without checking for a NULL value. Use g_clear_object instead of g_object_unref