dix: fix memory leak in AllocPseudo

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
This commit is contained in:
Tiago Vignatti 2011-03-28 20:07:06 +03:00
parent a6c71ce5d2
commit 6e5020f461

View File

@ -1879,6 +1879,7 @@ AllocPseudo (int client, ColormapPtr pmap, int c, int r, Bool contig,
{
for (p = ppixTemp; p < ppixTemp + npix; p++)
pmap->red[*p].refcnt = 0;
free(ppixTemp);
return BadAlloc;
}
pmap->clientPixelsRed[client] = ppix;