move free() after dereference (bug 11878)
authorBrian <brian.paul@tungstengraphics.com>
Tue, 7 Aug 2007 21:06:08 +0000 (22:06 +0100)
committerBrian <brian.paul@tungstengraphics.com>
Tue, 7 Aug 2007 21:06:08 +0000 (22:06 +0100)
src/mesa/drivers/dri/i810/i810screen.c

index f64c10a9ae099110e5476f9dd417140b27fbfad3..f8cf050d7e4febd78f0074277b1749b170413d0a 100644 (file)
@@ -288,8 +288,8 @@ i810InitDriver(__DRIscreenPrivate *sPriv)
              i810Screen->depth.handle,
              i810Screen->depth.size,
              (drmAddress *)&i810Screen->depth.map) != 0) {
-      FREE(i810Screen);
       drmUnmap(i810Screen->back.map, i810Screen->back.size);
+      FREE(i810Screen);
       sPriv->private = NULL;
       __driUtilMessage("i810InitDriver: drmMap (2) failed");
       return GL_FALSE;