intel: Destroy bufmgr in screen destroy, not context.
authorEric Anholt <eric@anholt.net>
Wed, 17 Sep 2008 00:01:06 +0000 (17:01 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 17 Sep 2008 00:02:41 +0000 (17:02 -0700)
Caused server crashes on second context creation since
7e0bbdcf033981282978554c2e68ce48b55aa291.

Bug #17600.

src/mesa/drivers/dri/intel/intel_context.c
src/mesa/drivers/dri/intel/intel_screen.c

index 23e0f6331ac2b9c3f33cdd2e0057e5cf8b78f48d..2ca57326066497639b4817930d5aa4daad319bea 100644 (file)
@@ -822,8 +822,6 @@ intelDestroyContext(__DRIcontextPrivate * driContextPriv)
 
       /* free the Mesa context */
       _mesa_free_context_data(&intel->ctx);
-
-      dri_bufmgr_destroy(intel->bufmgr);
    }
 }
 
index de098e5b723f2c05fd46bd826b7f7de225372b9a..373e0e155ee265e900cf01bd9109bd2ac993e542 100644 (file)
@@ -309,6 +309,7 @@ intelDestroyScreen(__DRIscreenPrivate * sPriv)
 {
    intelScreenPrivate *intelScreen = (intelScreenPrivate *) sPriv->private;
 
+   dri_bufmgr_destroy(intelScreen->bufmgr);
    intelUnmapScreenRegions(intelScreen);
 
    FREE(intelScreen);