diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-10-13 13:30:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-13 13:30:34 +0200 |
commit | f86fd80f30b7c85fc789ca1cf9ff75c1280d34b9 (patch) | |
tree | 1f748eaa4af260713146d06c214ab370830cb798 /platform | |
parent | 3be18d3d3796550ecb13cdec579bbbfeb3f529f9 (diff) | |
parent | f0dd693a087c2a7065491b5ebc07e433847f2a6f (diff) |
Merge pull request #53750 from Klowner/dbus-error-leak
Diffstat (limited to 'platform')
-rw-r--r-- | platform/linuxbsd/freedesktop_screensaver.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/platform/linuxbsd/freedesktop_screensaver.cpp b/platform/linuxbsd/freedesktop_screensaver.cpp index a6a3b27d76..3973d43d49 100644 --- a/platform/linuxbsd/freedesktop_screensaver.cpp +++ b/platform/linuxbsd/freedesktop_screensaver.cpp @@ -50,6 +50,7 @@ void FreeDesktopScreenSaver::inhibit() { DBusConnection *bus = dbus_bus_get(DBUS_BUS_SESSION, &error); if (dbus_error_is_set(&error)) { + dbus_error_free(&error); unsupported = true; return; } @@ -72,6 +73,7 @@ void FreeDesktopScreenSaver::inhibit() { DBusMessage *reply = dbus_connection_send_with_reply_and_block(bus, message, 50, &error); dbus_message_unref(message); if (dbus_error_is_set(&error)) { + dbus_error_free(&error); dbus_connection_unref(bus); unsupported = false; return; @@ -96,6 +98,7 @@ void FreeDesktopScreenSaver::uninhibit() { DBusConnection *bus = dbus_bus_get(DBUS_BUS_SESSION, &error); if (dbus_error_is_set(&error)) { + dbus_error_free(&error); unsupported = true; return; } @@ -110,6 +113,7 @@ void FreeDesktopScreenSaver::uninhibit() { DBusMessage *reply = dbus_connection_send_with_reply_and_block(bus, message, 50, &error); if (dbus_error_is_set(&error)) { + dbus_error_free(&error); dbus_connection_unref(bus); unsupported = true; return; |