dix: Fix undefined memset in dixInitPrivates
When we set these up initially, no subsystems have allocated any privates yet, so the storage address will be null, and memset(NULL, ...) is undefined.
This commit is contained in:
parent
535f14656a
commit
a41d45eedc
|
@ -447,7 +447,8 @@ _dixInitPrivates(PrivatePtr *privates, void *addr, DevPrivateType type)
|
|||
if (global_keys[type].offset == 0)
|
||||
addr = 0;
|
||||
*privates = addr;
|
||||
memset(addr, '\0', global_keys[type].offset);
|
||||
if (addr)
|
||||
memset(addr, '\0', global_keys[type].offset);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue