summaryrefslogtreecommitdiff
path: root/composite
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2008-02-28 21:52:32 -0500
committerEamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil>2008-02-28 21:52:32 -0500
commit4d91b1d5e422c5c460b1b7050baa9487a59b8aa8 (patch)
tree820828253b558889d6a6674eb8ca2c038225736f /composite
parent5675ae1f72145e9b719c613023da525731b42461 (diff)
XACE: Adjust the location of the COMPOSITE creation hook.
Avoids incrementing the refcnt if the hook fails.
Diffstat (limited to 'composite')
-rw-r--r--composite/compext.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/composite/compext.c b/composite/compext.c
index 97ea6d616..b3433f72b 100644
--- a/composite/compext.c
+++ b/composite/compext.c
@@ -289,14 +289,14 @@ ProcCompositeNameWindowPixmap (ClientPtr client)
if (!pPixmap)
return BadMatch;
- ++pPixmap->refcnt;
-
/* security creation/labeling check */
rc = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pixmap, RT_PIXMAP,
pPixmap, RT_WINDOW, pWin, DixCreateAccess);
if (rc != Success)
return rc;
+ ++pPixmap->refcnt;
+
if (!AddResource (stuff->pixmap, RT_PIXMAP, (pointer) pPixmap))
return BadAlloc;