aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/render
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/render')
-rw-r--r--xorg-server/render/render.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/xorg-server/render/render.c b/xorg-server/render/render.c
index c5da6d78f..ebb1d630a 100644
--- a/xorg-server/render/render.c
+++ b/xorg-server/render/render.c
@@ -1705,11 +1705,17 @@ ProcRenderCreateCursor (ClientPtr client)
GetColor(twocolor[1], 0),
&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;
}
static int