summaryrefslogtreecommitdiff
path: root/Xext/security.c
diff options
context:
space:
mode:
Diffstat (limited to 'Xext/security.c')
-rw-r--r--Xext/security.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/Xext/security.c b/Xext/security.c
index 7962fdb37..bae95a3b5 100644
--- a/Xext/security.c
+++ b/Xext/security.c
@@ -623,13 +623,16 @@ ProcSecurityRevokeAuthorization(
{
REQUEST(xSecurityRevokeAuthorizationReq);
SecurityAuthorizationPtr pAuth;
+ int rc;
REQUEST_SIZE_MATCH(xSecurityRevokeAuthorizationReq);
- pAuth = (SecurityAuthorizationPtr)SecurityLookupIDByType(client,
- stuff->authId, SecurityAuthorizationResType, DixDestroyAccess);
- if (!pAuth)
- return SecurityErrorBase + XSecurityBadAuthorization;
+ rc = dixLookupResourceByType((pointer *)&pAuth, stuff->authId,
+ SecurityAuthorizationResType, client,
+ DixDestroyAccess);
+ if (rc != Success)
+ return (rc == BadValue) ?
+ SecurityErrorBase + XSecurityBadAuthorization : rc;
FreeResource(stuff->authId, RT_NONE);
return Success;