summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2014-05-08 16:49:45 +0100
committerEmil Velikov <[email protected]>2014-05-10 02:09:02 +0100
commita3e78bab7fdc906bf2f4850094885b59ca3c6d08 (patch)
treea83980a0562850e7a04ec3150df6dfb5a7fbb90e /src/egl/drivers
parent42770ff94ea8a30de51d4887611fc94bf271cde4 (diff)
egl_dri2: cleanup memory leak in dri2_create_context()
Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/egl/drivers')
-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: