os/access: handle strdup failure in ComputeLocalClient

TRUE is the safe default, that's what we return for failing to get the
client cmd name too.

Co-Authored-by: Claude Code <noreply@anthropic.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2184>
This commit is contained in:
Peter Hutterer 2026-04-17 10:12:57 +10:00 committed by Marge Bot
parent 074ad5410e
commit f9a4614162

View file

@ -1073,6 +1073,9 @@ ComputeLocalClient(ClientPtr client)
char *cmd = strdup(cmdname);
Bool ret;
if (!cmd)
return TRUE;
/* Cut off any colon and whatever comes after it, see
* https://lists.freedesktop.org/archives/xorg-devel/2015-December/048164.html
*/