From 7f1a258ff9fc768a7fc13e5c37e1fd6d7ab5c33b 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 d984eec26..fb0ea4382 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);