windows: replace free() with _mesa_unreference_framebuffer()
authorBrian Paul <brian.paul@tungstengraphics.com>
Mon, 24 Nov 2008 18:10:58 +0000 (11:10 -0700)
committerBrian Paul <brian.paul@tungstengraphics.com>
Mon, 24 Nov 2008 18:10:58 +0000 (11:10 -0700)
Fixes invalid memory reference bug when exiting.

src/mesa/drivers/windows/gdi/wmesa.c

index 9dafb74723163f0e9d2e4c8876d82f55e4c58f99..1ddea33e35c2f008cafc0628b6b3d05685b6fddf 100644 (file)
@@ -60,7 +60,7 @@ wmesa_free_framebuffer(HDC hdc)
            FirstFramebuffer = pwfb->next;
        else
            prev->next = pwfb->next;
-       free(pwfb);
+        _mesa_unreference_framebuffer(&pwfb->Base);
     }
 }