diff --git a/hw/xfree86/os-support/linux/systemd-logind.c b/hw/xfree86/os-support/linux/systemd-logind.c index 97f8902e9..a2e358180 100644 --- a/hw/xfree86/os-support/linux/systemd-logind.c +++ b/hw/xfree86/os-support/linux/systemd-logind.c @@ -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;