mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-06-07 02:58:22 +02:00
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:
parent
2409bfda88
commit
731cb81ba1
1 changed files with 1 additions and 1 deletions
|
|
@ -137,7 +137,7 @@ createModeFromConfig(const __DRIcoreExtension * core,
|
|||
int i;
|
||||
|
||||
|
||||
config = calloc(1, sizeof *config);
|
||||
config = XNFcallocarray(1, sizeof *config);
|
||||
|
||||
config->driConfig = driConfig;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue