dix: fix null pointer dereference in new resource lookup function.
This commit is contained in:
parent
ddb26bccd2
commit
793470a835
|
@ -908,7 +908,6 @@ dixLookupResource(pointer *result, XID id, RESTYPE rtype,
|
||||||
ResourcePtr res = NULL;
|
ResourcePtr res = NULL;
|
||||||
|
|
||||||
*result = NULL;
|
*result = NULL;
|
||||||
client->errorValue = id;
|
|
||||||
|
|
||||||
if ((cid < MAXCLIENTS) && clientTable[cid].buckets) {
|
if ((cid < MAXCLIENTS) && clientTable[cid].buckets) {
|
||||||
res = clientTable[cid].resources[Hash(cid, id)];
|
res = clientTable[cid].resources[Hash(cid, id)];
|
||||||
|
@ -922,6 +921,7 @@ dixLookupResource(pointer *result, XID id, RESTYPE rtype,
|
||||||
return BadValue;
|
return BadValue;
|
||||||
|
|
||||||
if (client) {
|
if (client) {
|
||||||
|
client->errorValue = id;
|
||||||
cid = XaceHook(XACE_RESOURCE_ACCESS, client, id, res->type,
|
cid = XaceHook(XACE_RESOURCE_ACCESS, client, id, res->type,
|
||||||
mode, res->value);
|
mode, res->value);
|
||||||
if (cid != Success)
|
if (cid != Success)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user