mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-05 04:08:02 +02:00
glx: fix retval checks when failures occur for drawable creation.
(cherry picked from commit a26c77ff43)
This commit is contained in:
parent
0fd4d26240
commit
5cae7f5a60
1 changed files with 9 additions and 1 deletions
10
glx/glxdri.c
10
glx/glxdri.c
|
|
@ -642,7 +642,7 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen,
|
|||
if (visual->vid == glxConfig->visualID)
|
||||
break;
|
||||
if (i == pScreen->numVisuals)
|
||||
return GL_FALSE;
|
||||
return NULL;
|
||||
|
||||
context->hwContextID = FakeClientID(0);
|
||||
|
||||
|
|
@ -651,6 +651,9 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen,
|
|||
context->hwContextID, &hwContext);
|
||||
__glXleaveServer(GL_FALSE);
|
||||
|
||||
if (!retval)
|
||||
return NULL;
|
||||
|
||||
context->driContext =
|
||||
screen->legacy->createNewContext(screen->driScreen,
|
||||
config->driConfig,
|
||||
|
|
@ -705,6 +708,11 @@ __glXDRIscreenCreateDrawable(__GLXscreen *screen,
|
|||
pDraw, &hwDrawable);
|
||||
__glXleaveServer(GL_FALSE);
|
||||
|
||||
if (!retval) {
|
||||
xfree(private);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* The last argument is 'attrs', which is used with pbuffers which
|
||||
* we currently don't support. */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue