[gnome-shell/matthiasc/misc-fixes: 3/3] shell_dbus_acquire_name: Don't leak the result



commit 0fb98606ef098a2eab2157beb2ac770f4898d98a
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Sep 24 13:17:36 2015 -0400

    shell_dbus_acquire_name: Don't leak the result
    
    The GVariant returned by g_dbus_proxy_call_sync must be
    freed with g_variant_unref, to prevent a leak.

 src/main.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/src/main.c b/src/main.c
index 06cfbef..35816a1 100644
--- a/src/main.c
+++ b/src/main.c
@@ -75,6 +75,7 @@ shell_dbus_acquire_name (GDBusProxy  *bus,
       exit (1);
     }
   g_variant_get (request_name_variant, "(u)", request_name_result);
+  g_variant_unref (request_name_variant);
 }
 
 static void


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