[PATCH 03/10] dix: fix memory leak in AllocPseudo

Tiago Vignatti tiago.vignatti at nokia.com
Tue Mar 29 08:12:29 PDT 2011


Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
---
 dix/colormap.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/dix/colormap.c b/dix/colormap.c
index 2e9a806..188378b 100644
--- a/dix/colormap.c
+++ b/dix/colormap.c
@@ -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;
-- 
1.7.0.4



More information about the xorg-devel mailing list