st/glx: re-order destruction of buffers, visuals
authorBrian Paul <brianp@vmware.com>
Wed, 1 Sep 2010 18:39:04 +0000 (12:39 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 1 Sep 2010 18:40:31 +0000 (12:40 -0600)
Free the buffers before the visuals.  Fixes valgrind warning
reported in fd.o bug 29919.

src/gallium/state_trackers/glx/xlib/glx_api.c

index a90edfb0554fa3247fe69335ae9ed26a32fcc20c..dcd50e19d73e7ee325e48fcc665c48e7aed25327 100644 (file)
@@ -599,8 +599,8 @@ destroy_visuals_on_display(Display *dpy)
 static int
 close_display_callback(Display *dpy, XExtCodes *codes)
 {
-   destroy_visuals_on_display(dpy);
    xmesa_destroy_buffers_on_display(dpy);
+   destroy_visuals_on_display(dpy);
    return 0;
 }