From 731cb81ba132022d2e4b9696fa37232d328eb210 Mon Sep 17 00:00:00 2001 From: Mikhail Dmitrichenko Date: Mon, 18 May 2026 14:32:40 +0300 Subject: [PATCH] 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 Part-of: --- glx/glxdricommon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glx/glxdricommon.c b/glx/glxdricommon.c index 35a539629..a8fe6e94e 100644 --- a/glx/glxdricommon.c +++ b/glx/glxdricommon.c @@ -137,7 +137,7 @@ createModeFromConfig(const __DRIcoreExtension * core, int i; - config = calloc(1, sizeof *config); + config = XNFcallocarray(1, sizeof *config); config->driConfig = driConfig;