summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri/egldri.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/egl/drivers/dri/egldri.c')
-rw-r--r--src/egl/drivers/dri/egldri.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/egl/drivers/dri/egldri.c b/src/egl/drivers/dri/egldri.c
index df45fbfbe2f..3f9617a8f98 100644
--- a/src/egl/drivers/dri/egldri.c
+++ b/src/egl/drivers/dri/egldri.c
@@ -296,12 +296,8 @@ _eglDRIDestroySurface(_EGLDriver *drv, EGLDisplay dpy, EGLSurface surface)
fs->drawable.destroyDrawable(disp, fs->drawable.private);
- if (fs->Base.IsBound) {
- fs->Base.DeletePending = EGL_TRUE;
- }
- else {
+ if (!fs->Base.IsBound)
free(fs);
- }
return EGL_TRUE;
}
@@ -316,12 +312,8 @@ _eglDRIDestroyContext(_EGLDriver *drv, EGLDisplay dpy, EGLContext context)
fc->driContext.destroyContext(disp, 0, fc->driContext.private);
- if (fc->Base.IsBound) {
- fc->Base.DeletePending = EGL_TRUE;
- }
- else {
+ if (!fc->Base.IsBound)
free(fc);
- }
return EGL_TRUE;
}