xkb: add missing NULL check for strdup in XkbAddGeomProperty update path

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 13:09:21 +10:00 committed by Marge Bot
parent a29c8a352c
commit 665e8a0c43

View file

@ -555,6 +555,8 @@ XkbAddGeomProperty(XkbGeometryPtr geom, char *name, char *value)
if ((prop->name) && (strcmp(name, prop->name) == 0)) {
free(prop->value);
prop->value = strdup(value);
if (!prop->value)
return NULL;
return prop;
}
}