glx: use XNFcallocarray for DRI config allocation

createModeFromConfig() dereferences the allocated GLX DRI config
immediately after allocation. Use the X server no-fail allocator so
allocation failure is handled consistently instead of risking a NULL
dereference.

Signed-off-by: Mikhail Dmitrichenko <m.dmitrichenko222@gmail.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2217>
This commit is contained in:
Mikhail Dmitrichenko 2026-05-18 14:32:40 +03:00 committed by Marge Bot
parent 2409bfda88
commit 731cb81ba1

View file

@ -137,7 +137,7 @@ createModeFromConfig(const __DRIcoreExtension * core,
int i;
config = calloc(1, sizeof *config);
config = XNFcallocarray(1, sizeof *config);
config->driConfig = driConfig;