aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/gc.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-06-11 14:16:16 +0000
committermarha <marha@users.sourceforge.net>2010-06-11 14:16:16 +0000
commitd1e4f4b8546c7955c66dd023bfd6ef437db9d21d (patch)
tree529985e77bfc95aa95fe5b540e8f42b0ef041206 /xorg-server/dix/gc.c
parent13919cf85a6ca41d97238de13344aba59e0f7680 (diff)
parent4c61bf84b11e26e6f22648668c95ea760a379163 (diff)
downloadvcxsrv-d1e4f4b8546c7955c66dd023bfd6ef437db9d21d.tar.gz
vcxsrv-d1e4f4b8546c7955c66dd023bfd6ef437db9d21d.tar.bz2
vcxsrv-d1e4f4b8546c7955c66dd023bfd6ef437db9d21d.zip
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server/dix/gc.c')
-rw-r--r--xorg-server/dix/gc.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/xorg-server/dix/gc.c b/xorg-server/dix/gc.c
index e50c6319b..55ff3b89e 100644
--- a/xorg-server/dix/gc.c
+++ b/xorg-server/dix/gc.c
@@ -499,7 +499,7 @@ CreateGC(DrawablePtr pDrawable, BITS32 mask, XID *pval, int *pStatus,
{
GCPtr pGC;
- pGC = malloc(sizeof(GC));
+ pGC = dixAllocateObjectWithPrivates(GC, PRIVATE_GC);
if (!pGC)
{
*pStatus = BadAlloc;
@@ -512,7 +512,6 @@ CreateGC(DrawablePtr pDrawable, BITS32 mask, XID *pval, int *pStatus,
pGC->planemask = ~0;
pGC->serialNumber = GC_CHANGE_SERIAL_BIT;
pGC->funcs = 0;
- pGC->devPrivates = NULL;
pGC->fgPixel = 0;
pGC->bgPixel = 1;
pGC->lineWidth = 0;
@@ -583,7 +582,7 @@ out:
pGC = (GCPtr)NULL;
}
- return (pGC);
+ return pGC;
}
static Bool
@@ -805,9 +804,8 @@ FreeGC(pointer value, XID gid)
(*pGC->funcs->DestroyGC) (pGC);
if (pGC->dash != DefaultDash)
free(pGC->dash);
- dixFreePrivates(pGC->devPrivates);
- free(pGC);
- return(Success);
+ dixFreeObjectWithPrivates(pGC, PRIVATE_GC);
+ return Success;
}
/* CreateScratchGC(pScreen, depth)
@@ -828,7 +826,7 @@ CreateScratchGC(ScreenPtr pScreen, unsigned depth)
{
GCPtr pGC;
- pGC = malloc(sizeof(GC));
+ pGC = dixAllocateObjectWithPrivates(GC, PRIVATE_GC);
if (!pGC)
return (GCPtr)NULL;
@@ -837,7 +835,6 @@ CreateScratchGC(ScreenPtr pScreen, unsigned depth)
pGC->alu = GXcopy; /* dst <- src */
pGC->planemask = ~0;
pGC->serialNumber = 0;
- pGC->devPrivates = NULL;
pGC->fgPixel = 0;
pGC->bgPixel = 1;
pGC->lineWidth = 0;
@@ -1089,7 +1086,7 @@ SetClipRects(GCPtr pGC, int xOrigin, int yOrigin, int nrects,
newct = VerifyRectOrder(nrects, prects, ordering);
if (newct < 0)
- return(BadMatch);
+ return BadMatch;
size = nrects * sizeof(xRectangle);
prectsNew = malloc(size);
if (!prectsNew && size)