mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-09 13:08:12 +02:00
glx: handle strdup allocation failures
Co-Authored-by: Claude Code <noreply@anthropic.com> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2184>
This commit is contained in:
parent
6ae0869a40
commit
59cb8d4e8f
2 changed files with 4 additions and 0 deletions
|
|
@ -71,6 +71,8 @@ set_client_info(__GLXclientState * cl, xGLXSetClientInfoARBReq * req,
|
|||
|
||||
free(cl->GLClientextensions);
|
||||
cl->GLClientextensions = strdup(gl_extensions);
|
||||
if (!cl->GLClientextensions)
|
||||
return BadAlloc;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2501,6 +2501,8 @@ __glXDisp_ClientInfo(__GLXclientState * cl, GLbyte * pc)
|
|||
|
||||
free(cl->GLClientextensions);
|
||||
cl->GLClientextensions = strdup(buf);
|
||||
if (!cl->GLClientextensions)
|
||||
return BadAlloc;
|
||||
|
||||
return Success;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue