XACE: Adjust the location of the COMPOSITE creation hook.
Avoids incrementing the refcnt if the hook fails.
This commit is contained in:
parent
5675ae1f72
commit
4d91b1d5e4
|
@ -289,14 +289,14 @@ ProcCompositeNameWindowPixmap (ClientPtr client)
|
||||||
if (!pPixmap)
|
if (!pPixmap)
|
||||||
return BadMatch;
|
return BadMatch;
|
||||||
|
|
||||||
++pPixmap->refcnt;
|
|
||||||
|
|
||||||
/* security creation/labeling check */
|
/* security creation/labeling check */
|
||||||
rc = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pixmap, RT_PIXMAP,
|
rc = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pixmap, RT_PIXMAP,
|
||||||
pPixmap, RT_WINDOW, pWin, DixCreateAccess);
|
pPixmap, RT_WINDOW, pWin, DixCreateAccess);
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
|
++pPixmap->refcnt;
|
||||||
|
|
||||||
if (!AddResource (stuff->pixmap, RT_PIXMAP, (pointer) pPixmap))
|
if (!AddResource (stuff->pixmap, RT_PIXMAP, (pointer) pPixmap))
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue