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:
parent
a6c71ce5d2
commit
6e5020f461
|
@ -1879,6 +1879,7 @@ AllocPseudo (int client, ColormapPtr pmap, int c, int r, Bool contig,
|
||||||
{
|
{
|
||||||
for (p = ppixTemp; p < ppixTemp + npix; p++)
|
for (p = ppixTemp; p < ppixTemp + npix; p++)
|
||||||
pmap->red[*p].refcnt = 0;
|
pmap->red[*p].refcnt = 0;
|
||||||
|
free(ppixTemp);
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
}
|
}
|
||||||
pmap->clientPixelsRed[client] = ppix;
|
pmap->clientPixelsRed[client] = ppix;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user