[glib] GIOScheduler: Fix access after free in "cancelled" handler
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] GIOScheduler: Fix access after free in "cancelled" handler
- Date: Tue, 17 Jul 2012 17:46:17 +0000 (UTC)
commit a0b71839ee27eec27d8b9da24d25c153d6273f42
Author: Stef Walter <stefw gnome org>
Date: Tue Jul 17 18:34:16 2012 +0200
GIOScheduler: Fix access after free in "cancelled" handler
* GCancellable can be "cancelled" more than once if
g_cancellable_reset() is called.
* Don't assume that because the "cancelled" signal fired
it won't fire again.
https://bugzilla.gnome.org/show_bug.cgi?id=680111
gio/gioscheduler.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gio/gioscheduler.c b/gio/gioscheduler.c
index 856e4b9..24c6451 100644
--- a/gio/gioscheduler.c
+++ b/gio/gioscheduler.c
@@ -130,8 +130,8 @@ on_job_canceled (GCancellable *cancellable,
{
GIOSchedulerJob *job = user_data;
+ /* This might be called more than once */
job->io_priority = -1;
- job->cancellable_id = 0;
if (job_thread_pool != NULL)
g_thread_pool_set_sort_function (job_thread_pool,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]