aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-04-14 08:39:30 +0000
committermarha <marha@users.sourceforge.net>2011-04-14 08:39:30 +0000
commit898081f31f99dc35a1602a607a07d1aaff49ac40 (patch)
treeb2adbc0fd699cc5dc2af141df26130e7874f9369 /xorg-server/dix
parentc1e91b66cbcf91645f65b9d63f115dcb5a441406 (diff)
parent019fc27ce6dc2a1809107be10d4deb80e0fa436b (diff)
downloadvcxsrv-898081f31f99dc35a1602a607a07d1aaff49ac40.tar.gz
vcxsrv-898081f31f99dc35a1602a607a07d1aaff49ac40.tar.bz2
vcxsrv-898081f31f99dc35a1602a607a07d1aaff49ac40.zip
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server/dix')
-rw-r--r--xorg-server/dix/cursor.c5
-rw-r--r--xorg-server/dix/dispatch.c12
2 files changed, 10 insertions, 7 deletions
diff --git a/xorg-server/dix/cursor.c b/xorg-server/dix/cursor.c
index acd118a1c..4d5d51619 100644
--- a/xorg-server/dix/cursor.c
+++ b/xorg-server/dix/cursor.c
@@ -241,11 +241,8 @@ AllocARGBCursor(unsigned char *psrcbits, unsigned char *pmaskbits,
*ppCurs = NULL;
pCurs = (CursorPtr)calloc(CURSOR_REC_SIZE + CURSOR_BITS_SIZE, 1);
if (!pCurs)
- {
- free(psrcbits);
- free(pmaskbits);
return BadAlloc;
- }
+
bits = (CursorBitsPtr)((char *)pCurs + CURSOR_REC_SIZE);
dixInitPrivates(pCurs, pCurs + 1, PRIVATE_CURSOR);
dixInitPrivates(bits, bits + 1, PRIVATE_CURSOR_BITS)
diff --git a/xorg-server/dix/dispatch.c b/xorg-server/dix/dispatch.c
index 5e1c858b6..14775c35c 100644
--- a/xorg-server/dix/dispatch.c
+++ b/xorg-server/dix/dispatch.c
@@ -3017,11 +3017,17 @@ ProcCreateCursor (ClientPtr client)
&pCursor, client, stuff->cid);
if (rc != Success)
- return rc;
- if (!AddResource(stuff->cid, RT_CURSOR, (pointer)pCursor))
- return BadAlloc;
+ goto bail;
+ if (!AddResource(stuff->cid, RT_CURSOR, (pointer)pCursor)) {
+ rc = BadAlloc;
+ goto bail;
+ }
return Success;
+bail:
+ free(srcbits);
+ free(mskbits);
+ return rc;
}
int