aboutsummaryrefslogtreecommitdiffstats
path: root/src/glx
diff options
context:
space:
mode:
Diffstat (limited to 'src/glx')
-rw-r--r--src/glx/x11/drisw_glx.c2
-rw-r--r--src/glx/x11/glxcmds.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/glx/x11/drisw_glx.c b/src/glx/x11/drisw_glx.c
index b843ce484fb..1c229dde900 100644
--- a/src/glx/x11/drisw_glx.c
+++ b/src/glx/x11/drisw_glx.c
@@ -401,6 +401,8 @@ driCreateScreen(__GLXscreenConfigs * psc, int screen,
psc->configs = driConvertConfigs(psc->core, psc->configs, driver_configs);
psc->visuals = driConvertConfigs(psc->core, psc->visuals, driver_configs);
+ free(driver_configs);
+
psp->destroyScreen = driDestroyScreen;
psp->createContext = driCreateContext;
psp->createDrawable = driCreateDrawable;
diff --git a/src/glx/x11/glxcmds.c b/src/glx/x11/glxcmds.c
index 77471b8599c..820d8b98685 100644
--- a/src/glx/x11/glxcmds.c
+++ b/src/glx/x11/glxcmds.c
@@ -164,7 +164,7 @@ GetGLXScreenConfigs(Display *dpy, int scrn)
{
__GLXdisplayPrivate * const priv = __glXInitialize(dpy);
- return (priv->screenConfigs != NULL) ? &priv->screenConfigs[scrn] : NULL;
+ return (priv && priv->screenConfigs != NULL) ? &priv->screenConfigs[scrn] : NULL;
}