summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/glx/egl_glx.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/egl/drivers/glx/egl_glx.c')
-rw-r--r--src/egl/drivers/glx/egl_glx.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/egl/drivers/glx/egl_glx.c b/src/egl/drivers/glx/egl_glx.c
index 661b313ae2d..207b1ea7793 100644
--- a/src/egl/drivers/glx/egl_glx.c
+++ b/src/egl/drivers/glx/egl_glx.c
@@ -739,12 +739,8 @@ GLX_eglDestroySurface(_EGLDriver *drv, EGLDisplay dpy, EGLSurface surface)
return EGL_TRUE;
if (surf) {
_eglUnlinkSurface(surf);
- if (surf->IsBound) {
- surf->DeletePending = EGL_TRUE;
- }
- else {
+ if (!surf->IsBound)
free(surf);
- }
return EGL_TRUE;
}