summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri2/egl_dri2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/egl/drivers/dri2/egl_dri2.c')
-rw-r--r--src/egl/drivers/dri2/egl_dri2.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index 380bd7b095e..a5f71edb984 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -811,8 +811,9 @@ dri2_create_context(_EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf,
api = __DRI_API_GLES3;
break;
default:
- _eglError(EGL_BAD_PARAMETER, "eglCreateContext");
- return NULL;
+ _eglError(EGL_BAD_PARAMETER, "eglCreateContext");
+ free(dri2_ctx);
+ return NULL;
}
break;
case EGL_OPENGL_API: