From 7b6400a1b8d2f228fcbedf17c30a7e3924e4dd2a Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Thu, 9 Apr 2009 13:16:37 -0400 Subject: glx: Fix drawable private leak on destroy When a drawable goes away, we don't destroy the GLX drawable in full, since it may be current for a context. This means that when the drawable is destroyed in full later, the backend doesn't get a chance to destroy resources associated with the drawable (the DRI2Drawable). With this patch, we destroy the GLX drawable in full when it goes away and then track down all contexts that reference it and NULL their pointers. --- glx/glxdri.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'glx/glxdri.c') diff --git a/glx/glxdri.c b/glx/glxdri.c index cc6d93976..eeac7fcb2 100644 --- a/glx/glxdri.c +++ b/glx/glxdri.c @@ -238,6 +238,8 @@ __glXDRIdrawableDestroy(__GLXdrawable *drawable) __glXleaveServer(GL_FALSE); } + __glXDrawableRelease(drawable); + xfree(private); } -- cgit v1.2.3