summaryrefslogtreecommitdiff
path: root/hw/dmx
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2008-06-04 16:37:25 +0930
committerPeter Hutterer <peter@cs.unisa.edu.au>2008-06-05 16:14:12 +0930
commit246c10441bbf62646b77993b55233d5ceb93a81f (patch)
treee6c0417c83d4b9e849309b23c00fb46c3e7f30d1 /hw/dmx
parent17cd26225749a1daf7460b44e52f43082399b265 (diff)
dmx: fix false memory allocation.
beNumVisuals and the number of GLX Visuals can be significantly different.
Diffstat (limited to 'hw/dmx')
-rw-r--r--hw/dmx/dmxinit.c3
1 files changed, 1 insertions, 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) {