From dd0d5a757cbf91b8b9e01e7e92001fceeb715796 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 24 Sep 2015 13:16:56 -0400 Subject: [PATCH] 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 file changed, 1 insertion(+) diff --git a/src/main.c b/src/main.c index f6d69e741..06cfbef2d 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 ? error->message : ""); + g_clear_error (&error); if (!fatal) return; exit (1);