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.
This commit is contained in:
Matthias Clasen 2015-09-24 13:16:56 -04:00
parent 0bbb226faf
commit dd0d5a757c

View File

@ -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);