[glib] gtask: free error on finalize if it's set



commit 2c8008a905df7a67e18ec9642ac7d7905da3f3ce
Author: Xan Lopez <xan igalia com>
Date:   Tue Mar 26 19:19:41 2013 +0100

    gtask: free error on finalize if it's set
    
    https://bugzilla.gnome.org/show_bug.cgi?id=696652

 gio/gtask.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gio/gtask.c b/gio/gtask.c
index bdef1f4..6c7222e 100644
--- a/gio/gtask.c
+++ b/gio/gtask.c
@@ -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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]