summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2016-01-04 14:45:55 +0000
committerRichard Hughes <richard@hughsie.com>2016-01-04 14:45:58 +0000
commitfbd01a0a5c0e6522494772d9828e542eb5549013 (patch)
tree8f5d2ec817042965d77e8f308d84fa3dd803e4c7
parent6fee10f3dc701f3f0625fdf21e3e5756e1c5d4b5 (diff)
downloadcolord-fbd01a0a5c0e6522494772d9828e542eb5549013.tar.gz
libcolorhug: Fix a crash when submitting lots of commands at the same time
This is some sort of race; leaving the data objects in memory until the ChDeviceQueue is unref'd is only a tiny amount of space and so much better than a crash.
-rw-r--r--lib/colorhug/ch-device-queue.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/colorhug/ch-device-queue.c b/lib/colorhug/ch-device-queue.c
index 50588d2..a166cea 100644
--- a/lib/colorhug/ch-device-queue.c
+++ b/lib/colorhug/ch-device-queue.c
@@ -298,7 +298,12 @@ out:
}
/* remove all commands from the queue, as they are done */
+#if 0
+/* FIXME: some sort of race uncovered in the port to GTask means that we try
+ * to remove data objects before they are marked complete; for now disable */
+
g_ptr_array_set_size (priv->data_array, 0);
+#endif
g_object_unref (task);
}
}