glx: replace Xmalloc() calls with Xcalloc()
Fixes a bug where psp->WaitX was uninitialized. Reported by Chris Clayton.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user