[libdazzle] task-cache: avoid race in cancellation state
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdazzle] task-cache: avoid race in cancellation state
- Date: Wed, 5 Jul 2017 01:19:52 +0000 (UTC)
commit e87d36d46f9e0e1b964a8e17e374e9b447347bd5
Author: Christian Hergert <chergert redhat com>
Date: Tue Jul 4 17:32:56 2017 -0700
task-cache: avoid race in cancellation state
If the item was already removed from the cache, we would have
nothing to cancel. That can happen when racing to cancel things.
src/cache/dzl-task-cache.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/cache/dzl-task-cache.c b/src/cache/dzl-task-cache.c
index c5f98f6..60237f7 100644
--- a/src/cache/dzl-task-cache.c
+++ b/src/cache/dzl-task-cache.c
@@ -484,9 +484,9 @@ dzl_task_cache_cancel_in_idle (gpointer user_data)
g_cancellable_cancel (fetch_cancellable);
}
}
- }
- g_return_val_if_fail (cancelled, G_SOURCE_REMOVE);
+ g_return_val_if_fail (cancelled, G_SOURCE_REMOVE);
+ }
return G_SOURCE_REMOVE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]