gtask: free error on finalize if it's set
authorXan Lopez <xan@igalia.com>
Tue, 26 Mar 2013 18:19:41 +0000 (19:19 +0100)
committerXan Lopez <xan@igalia.com>
Tue, 26 Mar 2013 18:19:41 +0000 (19:19 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=696652

gio/gtask.c

index bdef1f4..6c7222e 100644 (file)
@@ -640,6 +640,9 @@ g_task_finalize (GObject *object)
   if (task->result_destroy && task->result.pointer)
     task->result_destroy (task->result.pointer);
 
+  if (task->error)
+      g_error_free (task->error);
+
   if (G_TASK_IS_THREADED (task))
     {
       g_mutex_clear (&task->lock);