From 246c10441bbf62646b77993b55233d5ceb93a81f Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 4 Jun 2008 16:37:25 +0930 Subject: [PATCH] dmx: fix false memory allocation. beNumVisuals and the number of GLX Visuals can be significantly different. --- hw/dmx/dmxinit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/dmx/dmxinit.c b/hw/dmx/dmxinit.c index 366bd1423..6d466c450 100644 --- a/hw/dmx/dmxinit.c +++ b/hw/dmx/dmxinit.c @@ -746,8 +746,7 @@ void InitOutput(ScreenInfo *pScreenInfo, int argc, char *argv[]) nconfigs = dmxScreen->numGlxVisuals; } - configprivs = xalloc(dmxScreen->beNumVisuals * - sizeof(dmxGlxVisualPrivate*)); + configprivs = xalloc(nconfigs * sizeof(dmxGlxVisualPrivate*)); if (configs != NULL && configprivs != NULL) {