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>
This commit is contained in:
parent
a17e8bda4d
commit
1035323b36
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue