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:
parent
0bbb226faf
commit
dd0d5a757c
@ -69,6 +69,7 @@ shell_dbus_acquire_name (GDBusProxy *bus,
|
|||||||
&error)))
|
&error)))
|
||||||
{
|
{
|
||||||
g_printerr ("failed to acquire %s: %s\n", name, error ? error->message : "");
|
g_printerr ("failed to acquire %s: %s\n", name, error ? error->message : "");
|
||||||
|
g_clear_error (&error);
|
||||||
if (!fatal)
|
if (!fatal)
|
||||||
return;
|
return;
|
||||||
exit (1);
|
exit (1);
|
||||||
|
Loading…
Reference in New Issue
Block a user