From 084ae9e38812f19751a086eea7ce555761ae5a17 Mon Sep 17 00:00:00 2001 From: Jerome Glisse Date: Thu, 23 Oct 2008 11:28:53 +0200 Subject: [PATCH] dri2: fail at context creation if driver fail to create it's context --- glx/glxdri2.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/glx/glxdri2.c b/glx/glxdri2.c index 207ad063f..c4105e26d 100644 --- a/glx/glxdri2.c +++ b/glx/glxdri2.c @@ -303,6 +303,10 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen, (*screen->dri2->createNewContext)(screen->driScreen, config->driConfig, driShare, context); + if (context->driContext == NULL) { + xfree(context); + return NULL; + } return &context->base; }