modules+util: fix actual (potential) memory leaks

This commit is contained in:
Tamino Bauknecht
2023-10-20 22:41:53 +02:00
parent a0b63d6b1e
commit ae748b2644
6 changed files with 39 additions and 19 deletions

View File

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