mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
XACE: Adjust the location of the COMPOSITE creation hook.
Avoids incrementing the refcnt if the hook fails.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user