diff options
author | Emil Velikov <[email protected]> | 2014-05-08 16:49:45 +0100 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2014-05-10 02:09:02 +0100 |
commit | a3e78bab7fdc906bf2f4850094885b59ca3c6d08 (patch) | |
tree | a83980a0562850e7a04ec3150df6dfb5a7fbb90e /src/egl/drivers/dri2/egl_dri2.c | |
parent | 42770ff94ea8a30de51d4887611fc94bf271cde4 (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/dri2/egl_dri2.c')
-rw-r--r-- | src/egl/drivers/dri2/egl_dri2.c | 5 |
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: |