Revert "Fix potential memory leaks"

This commit is contained in:
Alexis Rouillard
2023-10-22 09:44:46 +02:00
committed by GitHub
parent dbb887b4a9
commit 2d33c20231
13 changed files with 29 additions and 90 deletions

View File

@ -7,7 +7,8 @@ namespace {
class PrepareForSleep {
private:
PrepareForSleep() {
login1_connection = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, NULL);
GError *error = NULL;
login1_connection = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &error);
if (!login1_connection) {
spdlog::warn("Unable to connect to the SYSTEM Bus!...");
} else {