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 35b38d5cb2
commit 7f1a258ff9

View File

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