Commit def6f74f authored by Daniel Stone's avatar Daniel Stone
Browse files

Xvfb: Remove usage of alloca

Replace with heap allocations
parent 259f4c36
......@@ -482,9 +482,9 @@ vfbInstallColormap(ColormapPtr pmap)
swapcopy32(pXWDHeader->bits_per_rgb, pVisual->bitsPerRGBValue);
swapcopy32(pXWDHeader->colormap_entries, pVisual->ColormapEntries);
ppix = (Pixel *)ALLOCATE_LOCAL(entries * sizeof(Pixel));
prgb = (xrgb *)ALLOCATE_LOCAL(entries * sizeof(xrgb));
defs = (xColorItem *)ALLOCATE_LOCAL(entries * sizeof(xColorItem));
ppix = (Pixel *)xalloc(entries * sizeof(Pixel));
prgb = (xrgb *)xalloc(entries * sizeof(xrgb));
defs = (xColorItem *)xalloc(entries * sizeof(xColorItem));
for (i = 0; i < entries; i++) ppix[i] = i;
/* XXX truecolor */
......@@ -499,9 +499,9 @@ vfbInstallColormap(ColormapPtr pmap)
}
(*pmap->pScreen->StoreColors)(pmap, entries, defs);
DEALLOCATE_LOCAL(ppix);
DEALLOCATE_LOCAL(prgb);
DEALLOCATE_LOCAL(defs);
xfree(ppix);
xfree(prgb);
xfree(defs);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment