summaryrefslogtreecommitdiff
path: root/glx/glxdriswrast.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2009-04-09 13:16:37 -0400
committerKristian Høgsberg <krh@redhat.com>2009-04-13 13:17:53 -0400
commit7b6400a1b8d2f228fcbedf17c30a7e3924e4dd2a (patch)
tree81755c27fb2cc6997c9ba3997ca1e42d3cd133e4 /glx/glxdriswrast.c
parent140463a197fb93d0a4bfad924efc35b860e8cc54 (diff)
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.
Diffstat (limited to 'glx/glxdriswrast.c')
-rw-r--r--glx/glxdriswrast.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/glx/glxdriswrast.c b/glx/glxdriswrast.c
index de89d381e..328aa7e56 100644
--- a/glx/glxdriswrast.c
+++ b/glx/glxdriswrast.c
@@ -102,6 +102,8 @@ __glXDRIdrawableDestroy(__GLXdrawable *drawable)
FreeScratchGC(private->gc);
FreeScratchGC(private->swapgc);
+ __glXDrawableRelease(drawable);
+
xfree(private);
}