diff options
author | Chia-I Wu <[email protected]> | 2010-06-30 18:21:09 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2010-06-30 18:32:48 +0800 |
commit | c5bc0a8d666334cb9ae823a12fac53f02a1ac592 (patch) | |
tree | a56b6a71b80f4610c44de09339082620e9f945e0 /src/gallium | |
parent | 8b0c6c4a8dc1899d56e52fe3b0a9e1165c30ecae (diff) |
st/egl: Manually free configs on terminate.
The configs should be FREE()ed, not free()ed. We cannot rely on
_eglCleanupDisplay here.
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/state_trackers/egl/common/egl_g3d.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/egl/common/egl_g3d.c b/src/gallium/state_trackers/egl/common/egl_g3d.c index 4815a8a3222..b6321e6b437 100644 --- a/src/gallium/state_trackers/egl/common/egl_g3d.c +++ b/src/gallium/state_trackers/egl/common/egl_g3d.c @@ -425,6 +425,13 @@ static struct native_event_handler egl_g3d_native_event_handler = { }; static void +egl_g3d_free_config(void *conf) +{ + struct egl_g3d_config *gconf = egl_g3d_config((_EGLConfig *) conf); + FREE(gconf); +} + +static void egl_g3d_free_screen(void *scr) { struct egl_g3d_screen *gscr = egl_g3d_screen((_EGLScreen *) scr); @@ -438,16 +445,21 @@ egl_g3d_terminate(_EGLDriver *drv, _EGLDisplay *dpy) struct egl_g3d_display *gdpy = egl_g3d_display(dpy); _eglReleaseDisplayResources(drv, dpy); - _eglCleanupDisplay(dpy); if (gdpy->pipe) gdpy->pipe->destroy(gdpy->pipe); + if (dpy->Configs) { + _eglDestroyArray(dpy->Configs, egl_g3d_free_config); + dpy->Configs = NULL; + } if (dpy->Screens) { _eglDestroyArray(dpy->Screens, egl_g3d_free_screen); dpy->Screens = NULL; } + _eglCleanupDisplay(dpy); + if (gdpy->smapi) egl_g3d_destroy_st_manager(gdpy->smapi); |