[glib] GDBusProxy: Fix error handling in synchronous initialization codepath



commit ed7f59770e01623fa411530c81cbb04f73555a4c
Author: David Zeuthen <davidz redhat com>
Date:   Wed Jun 9 17:08:34 2010 -0400

    GDBusProxy: Fix error handling in synchronous initialization codepath
    
    Signed-off-by: David Zeuthen <davidz redhat com>

 gio/gdbusproxy.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gio/gdbusproxy.c b/gio/gdbusproxy.c
index b4a6412..fe5c97d 100644
--- a/gio/gdbusproxy.c
+++ b/gio/gdbusproxy.c
@@ -863,7 +863,11 @@ initable_init (GInitable     *initable,
            * fact that GetAll() failed
            */
           //g_debug ("error: %d %d %s", error->domain, error->code, error->message);
-          g_error_free (error);
+          if (error != NULL)
+            {
+              g_error_free (*error);
+              *error = NULL;
+            }
           ret = TRUE;
           goto out;
         }



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