glx: replace Xmalloc() calls with Xcalloc()
Fixes a bug where psp->WaitX was uninitialized. Reported by Chris Clayton.
This commit is contained in:
parent
0a56a49687
commit
dd4c142e90
|
@ -614,7 +614,7 @@ static __GLXDRIscreen *driCreateScreen(__GLXscreenConfigs *psc, int screen,
|
|||
char *driverName;
|
||||
int i;
|
||||
|
||||
psp = Xmalloc(sizeof *psp);
|
||||
psp = Xcalloc(1, sizeof *psp);
|
||||
if (psp == NULL)
|
||||
return NULL;
|
||||
|
||||
|
|
|
@ -359,7 +359,7 @@ driCreateScreen(__GLXscreenConfigs * psc, int screen,
|
|||
const char *driverName = "swrast";
|
||||
int i;
|
||||
|
||||
psp = Xmalloc(sizeof *psp);
|
||||
psp = Xcalloc(1, sizeof *psp);
|
||||
if (psp == NULL)
|
||||
return NULL;
|
||||
|
||||
|
|
Loading…
Reference in New Issue