wayland: Destroy frame callback when destroying surface
authorJonas Ådahl <jadahl@gmail.com>
Sat, 27 Oct 2012 22:50:12 +0000 (00:50 +0200)
committerKristian Høgsberg <krh@bitplanet.net>
Wed, 7 Nov 2012 21:13:03 +0000 (16:13 -0500)
commita3b6b2d3055070da9bf7054fecfd0b171c398eb7
tree4064e9278000438ef021e22183bd121452ca050a
parent0b61f0b14894792baa48d59ff3df167334c7d83e
wayland: Destroy frame callback when destroying surface

If a frame callback is not destroyed when destroying a surface, its
handler function will be invoked if the surface was destroyed after the
callback was requested but before it was invoked, causing a write on
free:ed memory.

This can happen if eglDestroySurface() is called shortly after
eglSwapBuffers().

Note: This is a candidate for stable branches.

Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
src/egl/drivers/dri2/platform_wayland.c
src/gallium/state_trackers/egl/wayland/native_wayland.c