Compare commits

...

1 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult 693927946e os-support: systemd-logind: don't hard-crash Xserver on strdup() fail
No need to directly hard-crash the Xserver when strdup() fails, instead
try to handle the situation gracefully.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-05-15 19:06:42 +02:00

View File

@ -492,7 +492,11 @@ connect_hook(DBusConnection *connection, void *data)
error.message);
goto cleanup;
}
session = XNFstrdup(session);
session = strdup(session);
if (!session) {
LogMessage(X_ERROR, "systemd-logind: out of memory\n");
goto cleanup;
}
dbus_message_unref(reply);
reply = NULL;