[gnome-shell] shell_dbus_acquire_name: Don't leak error



commit 7f1a258ff9fc768a7fc13e5c37e1fd6d7ab5c33b
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Sep 24 13:16:56 2015 -0400

    shell_dbus_acquire_name: Don't leak error
    
    If fatal is not set, we return from this function in the error
    case. Don't leak the GError if that happens.

 src/main.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/src/main.c b/src/main.c
index d984eec..fb0ea43 100644
--- a/src/main.c
+++ b/src/main.c
@@ -69,6 +69,7 @@ shell_dbus_acquire_name (GDBusProxy  *bus,
                                                        &error)))
     {
       g_printerr ("failed to acquire %s: %s\n", name, error->message);
+      g_clear_error (&error);
       if (!fatal)
         return;
       exit (1);


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