summaryrefslogtreecommitdiffstats
path: root/src/egl/main/egldisplay.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/egl/main/egldisplay.c')
-rw-r--r--src/egl/main/egldisplay.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/egl/main/egldisplay.c b/src/egl/main/egldisplay.c
index 8fd29b8..540efd4 100644
--- a/src/egl/main/egldisplay.c
+++ b/src/egl/main/egldisplay.c
@@ -96,11 +96,25 @@ _eglGetCurrentDisplay(void)
}
+/**
+ * Free all the data hanging of an _EGLDisplay object, but not
+ * the object itself.
+ */
void
_eglCleanupDisplay(_EGLDisplay *disp)
{
- /* XXX incomplete */
+ EGLint i;
+
+ for (i = 0; i < disp->NumConfigs; i++) {
+ free(disp->Configs[i]);
+ }
free(disp->Configs);
+ disp->Configs = NULL;
+
+ /* XXX incomplete */
+
free((void *) disp->DriverName);
- /* driver deletes _EGLDisplay */
+ disp->DriverName = NULL;
+
+ /* driver deletes the _EGLDisplay object */
}