glx: replace Xmalloc() calls with Xcalloc()

Fixes a bug where psp->WaitX was uninitialized.  Reported by Chris Clayton.
This commit is contained in:
Brian Paul 2009-05-04 07:52:55 -06:00
parent 0a56a49687
commit dd4c142e90
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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;